From 2eebe33d3b783b71bdab811888a86dc566d54971 Mon Sep 17 00:00:00 2001 From: DenserMeerkat Date: Thu, 13 Jun 2024 00:56:17 +0530 Subject: [PATCH] fix: collection pane scroll padding --- lib/consts.dart | 11 +++++++++-- lib/screens/home_page/collection_pane.dart | 8 +++++--- lib/screens/mobile/widgets/page_base.dart | 4 +--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/consts.dart b/lib/consts.dart index 625eaafe..1333cc86 100644 --- a/lib/consts.dart +++ b/lib/consts.dart @@ -109,14 +109,21 @@ const kP8CollectionPane = EdgeInsets.only( //right: 4.0, // bottom: 8.0, ); -const kPt28 = EdgeInsets.only(top: 28); -const kPt32 = EdgeInsets.only(top: 32); +const kPt28 = EdgeInsets.only( + top: 28, +); +const kPt32 = EdgeInsets.only( + top: 32, +); const kPb10 = EdgeInsets.only( bottom: 10, ); const kPb15 = EdgeInsets.only( bottom: 15, ); +const kPb70 = EdgeInsets.only( + bottom: 70, +); const kHSpacer4 = SizedBox(width: 4); const kHSpacer5 = SizedBox(width: 5); const kHSpacer10 = SizedBox(width: 10); diff --git a/lib/screens/home_page/collection_pane.dart b/lib/screens/home_page/collection_pane.dart index e1edd978..66a3d93a 100644 --- a/lib/screens/home_page/collection_pane.dart +++ b/lib/screens/home_page/collection_pane.dart @@ -27,9 +27,10 @@ class CollectionPane extends ConsumerWidget { backgroundColor: Theme.of(context).colorScheme.surface, surfaceTintColor: kColorTransparent, child: Padding( - padding: !context.isMediumWindow && kIsMacOS - ? kP24CollectionPane - : kP8CollectionPane, + padding: (!context.isMediumWindow && kIsMacOS + ? kP24CollectionPane + : kP8CollectionPane) + + (context.isMediumWindow ? kPb70 : EdgeInsets.zero), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ @@ -113,6 +114,7 @@ class CollectionPane extends ConsumerWidget { const Expanded( child: RequestList(), ), + kVSpacer5 ], ), ), diff --git a/lib/screens/mobile/widgets/page_base.dart b/lib/screens/mobile/widgets/page_base.dart index b1bbb247..38fbbd7f 100644 --- a/lib/screens/mobile/widgets/page_base.dart +++ b/lib/screens/mobile/widgets/page_base.dart @@ -33,9 +33,7 @@ class PageBase extends ConsumerWidget { return Stack( children: [ Container( - padding: (context.isMediumWindow - ? const EdgeInsets.only(bottom: 70) - : EdgeInsets.zero) + + padding: (context.isMediumWindow ? kPb70 : EdgeInsets.zero) + (kIsWindows || kIsMacOS ? kPt28 : EdgeInsets.zero), color: Theme.of(context).colorScheme.surface, child: scaffold,