From ad42f6e198265a4b1dd9b4d6b11472011952a5fa Mon Sep 17 00:00:00 2001 From: CTalvio Date: Sat, 4 May 2024 21:39:06 +0300 Subject: [PATCH] Respect taskbar/softkeys and some other tweaks --- lib/shared/image_viewer.dart | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/shared/image_viewer.dart b/lib/shared/image_viewer.dart index 5e181b849..e0a92bbb9 100644 --- a/lib/shared/image_viewer.dart +++ b/lib/shared/image_viewer.dart @@ -154,6 +154,14 @@ class _ImageViewerState extends State with TickerProviderStateMixin Animation? animation; return Stack( children: [ + AppBar( + backgroundColor: Colors.transparent, + systemOverlayStyle: const SystemUiOverlayStyle( + // Forcing status bar to display bright icons even in light mode + statusBarIconBrightness: Brightness.light, // For Android (dark icons) + statusBarBrightness: Brightness.dark, // For iOS (dark icons) + ), + ), AnimatedContainer( duration: const Duration(milliseconds: 400), color: fullscreen ? Colors.black : Colors.black.withOpacity(slideTransparency), @@ -194,7 +202,7 @@ class _ImageViewerState extends State with TickerProviderStateMixin } } : null, - // End doubltap zoom + // End doubletap zoom onVerticalDragEnd: slideZooming ? (details) { setState(() { @@ -383,6 +391,7 @@ class _ImageViewerState extends State with TickerProviderStateMixin opacity: fullscreen ? 0.0 : 1.0, duration: const Duration(milliseconds: 200), child: Container( + padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.bottomCenter, @@ -390,12 +399,11 @@ class _ImageViewerState extends State with TickerProviderStateMixin stops: [0, 0.3, 1], colors: [ Colors.transparent, - Colors.black12, Colors.black26, + Colors.black45, ], ), ), - padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom), child: Row( mainAxisAlignment: MainAxisAlignment.start, children: [ @@ -428,8 +436,8 @@ class _ImageViewerState extends State with TickerProviderStateMixin stops: [0, 0.3, 1], colors: [ Colors.transparent, - Colors.black12, Colors.black26, + Colors.black45, ], ), ), @@ -477,7 +485,6 @@ class _ImageViewerState extends State with TickerProviderStateMixin Icons.share_rounded, semanticLabel: "Share", color: Colors.white.withOpacity(0.90), - shadows: const [Shadow(color: Colors.black, blurRadius: 50.0), Shadow(color: Colors.black, blurRadius: 50.0)], ), ), ),