fix: collection pane scroll padding

This commit is contained in:
DenserMeerkat
2024-06-13 00:56:17 +05:30
parent 04f763eca5
commit 605afefd9f
3 changed files with 102 additions and 90 deletions

View File

@ -109,14 +109,21 @@ const kP8CollectionPane = EdgeInsets.only(
//right: 4.0, //right: 4.0,
// bottom: 8.0, // bottom: 8.0,
); );
const kPt28 = EdgeInsets.only(top: 28); const kPt28 = EdgeInsets.only(
const kPt32 = EdgeInsets.only(top: 32); top: 28,
);
const kPt32 = EdgeInsets.only(
top: 32,
);
const kPb10 = EdgeInsets.only( const kPb10 = EdgeInsets.only(
bottom: 10, bottom: 10,
); );
const kPb15 = EdgeInsets.only( const kPb15 = EdgeInsets.only(
bottom: 15, bottom: 15,
); );
const kPb70 = EdgeInsets.only(
bottom: 70,
);
const kHSpacer4 = SizedBox(width: 4); const kHSpacer4 = SizedBox(width: 4);
const kHSpacer5 = SizedBox(width: 5); const kHSpacer5 = SizedBox(width: 5);
const kHSpacer10 = SizedBox(width: 10); const kHSpacer10 = SizedBox(width: 10);

View File

@ -22,8 +22,15 @@ class CollectionPane extends ConsumerWidget {
child: CircularProgressIndicator(), child: CircularProgressIndicator(),
); );
} }
return Padding( return Drawer(
padding: kIsMacOS ? kP24CollectionPane : kP8CollectionPane, shape: const ContinuousRectangleBorder(),
backgroundColor: Theme.of(context).colorScheme.surface,
surfaceTintColor: kColorTransparent,
child: Padding(
padding: (!context.isMediumWindow && kIsMacOS
? kP24CollectionPane
: kP8CollectionPane) +
(context.isMediumWindow ? kPb70 : EdgeInsets.zero),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [
@ -45,7 +52,8 @@ class CollectionPane extends ConsumerWidget {
.saveData(); .saveData();
overlayWidget.hide(); overlayWidget.hide();
overlayWidget.show( overlayWidget.show(
widget: const SavingOverlay(saveCompleted: true)); widget:
const SavingOverlay(saveCompleted: true));
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 1));
overlayWidget.hide(); overlayWidget.hide();
}, },
@ -109,6 +117,7 @@ class CollectionPane extends ConsumerWidget {
kVSpacer5 kVSpacer5
], ],
), ),
),
); );
} }
} }

View File

@ -39,16 +39,12 @@ class PageBase extends ConsumerWidget {
); );
return Stack( return Stack(
children: [ children: [
!context.isCompactWindow Container(
? Row( padding: (context.isMediumWindow ? kPb70 : EdgeInsets.zero) +
children: [ (kIsWindows || kIsMacOS ? kPt28 : EdgeInsets.zero),
const NavRail(), color: Theme.of(context).colorScheme.surface,
Expanded(
child: scaffold, child: scaffold,
), ),
],
)
: scaffold,
if (kIsWindows) if (kIsWindows)
SizedBox( SizedBox(
height: 29, height: 29,