From 039e1696dd1a5bf5803d2526380460dd2afff079 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Thu, 24 Apr 2025 11:14:13 +0800 Subject: [PATCH] mod: img preview Signed-off-by: bggRGjQaUbCoE --- .../interactiveviewer_gallery.dart | 8 ++------ lib/pages/search_trending/view.dart | 8 ++++---- lib/utils/extension.dart | 2 ++ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart b/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart index d846d7809..06db9549e 100644 --- a/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart +++ b/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart @@ -329,12 +329,8 @@ class _InteractiveviewerGalleryState extends State left: 0, right: 0, child: Container( - padding: EdgeInsets.fromLTRB( - 12, - 8, - 20, - MediaQuery.of(context).padding.bottom + 8, - ), + padding: MediaQuery.paddingOf(context) + + const EdgeInsets.fromLTRB(12, 8, 20, 8), decoration: _enablePageView ? BoxDecoration( gradient: LinearGradient( diff --git a/lib/pages/search_trending/view.dart b/lib/pages/search_trending/view.dart index 52cd65de3..091655832 100644 --- a/lib/pages/search_trending/view.dart +++ b/lib/pages/search_trending/view.dart @@ -67,14 +67,14 @@ class _SearchTrendingPageState extends State { preferredSize: Size.fromHeight(56), child: Obx( () { - final half = _scrollRatio.value >= 0.5; + final flag = removePadding || _scrollRatio.value >= 0.5; return AppBar( title: Opacity( opacity: _scrollRatio.value, child: Text( 'B站热搜', style: TextStyle( - color: half ? null : Colors.white, + color: flag ? null : Colors.white, ), ), ), @@ -82,8 +82,8 @@ class _SearchTrendingPageState extends State { .colorScheme .surface .withOpacity(_scrollRatio.value), - foregroundColor: removePadding || half ? null : Colors.white, - systemOverlayStyle: removePadding || half + foregroundColor: flag ? null : Colors.white, + systemOverlayStyle: flag ? null : SystemUiOverlayStyle( statusBarBrightness: Brightness.dark, diff --git a/lib/utils/extension.dart b/lib/utils/extension.dart index 6a634a1bb..1faff43eb 100644 --- a/lib/utils/extension.dart +++ b/lib/utils/extension.dart @@ -91,6 +91,7 @@ extension BuildContextExt on BuildContext { required List imgList, ValueChanged? onDismissed, }) { + bool isMemberPage = Get.currentRoute.startsWith('/member?'); Navigator.of(this).push( HeroDialogRoute( builder: (context) => InteractiveviewerGallery( @@ -98,6 +99,7 @@ extension BuildContextExt on BuildContext { initIndex: initialPage ?? 0, onPageChanged: (int pageIndex) {}, onDismissed: onDismissed, + setStatusBar: !isMemberPage, ), ), );