From 236e3e7cfcdd7907c5c76af12c9b71dbb4b373bd Mon Sep 17 00:00:00 2001 From: Sam Matthews <75203773+TheLidlMan@users.noreply.github.com> Date: Tue, 4 Nov 2025 05:06:55 +0000 Subject: [PATCH] Fix poster sizing on home screen to match libraries view - Increase minimum poster width from 130px to 160px - Adjust poster sizing to account for MediaCard padding (16px) - Calculate poster dimensions based on actual display area - Ensure consistent poster sizing across Home and Libraries screens Fixes #13 --- lib/screens/discover_screen.dart | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/screens/discover_screen.dart b/lib/screens/discover_screen.dart index f34698b3..e6333510 100644 --- a/lib/screens/discover_screen.dart +++ b/lib/screens/discover_screen.dart @@ -961,20 +961,24 @@ class _DiscoverScreenState extends State child: LayoutBuilder( builder: (context, constraints) { // Responsive card width based on screen size + // Match Libraries screen sizing (190px baseline) final screenWidth = constraints.maxWidth; final cardWidth = screenWidth > 1600 ? 220.0 : screenWidth > 1200 ? 200.0 : screenWidth > 800 - ? 160.0 - : 130.0; + ? 190.0 + : 160.0; + // MediaCard has 8px padding on all sides (16px total horizontally) + // So actual poster width is cardWidth - 16 + final posterWidth = cardWidth - 16; // 2:3 poster aspect ratio (height is 1.5x width) - final cardHeight = cardWidth * 1.5; + final posterHeight = posterWidth * 1.5; // Container height = poster + padding + spacing + text - // 8px top padding + cardHeight + 4px spacing + ~26px text + 8px bottom padding - final containerHeight = cardHeight + 46; + // 8px top padding + posterHeight + 4px spacing + ~26px text + 8px bottom padding + final containerHeight = posterHeight + 46; return SizedBox( height: containerHeight, @@ -992,7 +996,7 @@ class _DiscoverScreenState extends State key: Key(item.ratingKey), item: item, width: cardWidth, - height: cardHeight, + height: posterHeight, onRefresh: updateItem, ), );