fixed viewer feedback bottom padding with nav gestures

This commit is contained in:
Thibault Deckers 2022-09-02 19:45:12 +02:00
parent c8f3900a0d
commit c5f8981a7e
2 changed files with 6 additions and 1 deletions

View file

@ -60,6 +60,7 @@ mixin FeedbackMixin {
OverlaySupportEntry? notificationOverlayEntry;
notificationOverlayEntry = showOverlayNotification(
(context) => SafeArea(
bottom: false,
child: Padding(
padding: margin,
child: OverlaySnackBar(

View file

@ -37,7 +37,11 @@ class ViewerBottomOverlay extends StatefulWidget {
State<StatefulWidget> createState() => _ViewerBottomOverlayState();
static double actionSafeHeight(BuildContext context) {
return ViewerButtons.preferredHeight(context) + (settings.showOverlayThumbnailPreview ? ViewerThumbnailPreview.preferredHeight : 0);
final mq = context.read<MediaQueryData>();
final mqPaddingBottom = max(mq.effectiveBottomPadding, mq.systemGestureInsets.bottom);
final buttonHeight = ViewerButtons.preferredHeight(context);
final thumbnailHeight = (settings.showOverlayThumbnailPreview ? ViewerThumbnailPreview.preferredHeight : 0);
return mqPaddingBottom + buttonHeight + thumbnailHeight;
}
}