mod: img preview

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-24 11:14:13 +08:00
parent 636e083044
commit 039e1696dd
3 changed files with 8 additions and 10 deletions

View File

@@ -329,12 +329,8 @@ class _InteractiveviewerGalleryState extends State<InteractiveviewerGallery>
left: 0, left: 0,
right: 0, right: 0,
child: Container( child: Container(
padding: EdgeInsets.fromLTRB( padding: MediaQuery.paddingOf(context) +
12, const EdgeInsets.fromLTRB(12, 8, 20, 8),
8,
20,
MediaQuery.of(context).padding.bottom + 8,
),
decoration: _enablePageView decoration: _enablePageView
? BoxDecoration( ? BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(

View File

@@ -67,14 +67,14 @@ class _SearchTrendingPageState extends State<SearchTrendingPage> {
preferredSize: Size.fromHeight(56), preferredSize: Size.fromHeight(56),
child: Obx( child: Obx(
() { () {
final half = _scrollRatio.value >= 0.5; final flag = removePadding || _scrollRatio.value >= 0.5;
return AppBar( return AppBar(
title: Opacity( title: Opacity(
opacity: _scrollRatio.value, opacity: _scrollRatio.value,
child: Text( child: Text(
'B站热搜', 'B站热搜',
style: TextStyle( style: TextStyle(
color: half ? null : Colors.white, color: flag ? null : Colors.white,
), ),
), ),
), ),
@@ -82,8 +82,8 @@ class _SearchTrendingPageState extends State<SearchTrendingPage> {
.colorScheme .colorScheme
.surface .surface
.withOpacity(_scrollRatio.value), .withOpacity(_scrollRatio.value),
foregroundColor: removePadding || half ? null : Colors.white, foregroundColor: flag ? null : Colors.white,
systemOverlayStyle: removePadding || half systemOverlayStyle: flag
? null ? null
: SystemUiOverlayStyle( : SystemUiOverlayStyle(
statusBarBrightness: Brightness.dark, statusBarBrightness: Brightness.dark,

View File

@@ -91,6 +91,7 @@ extension BuildContextExt on BuildContext {
required List<SourceModel> imgList, required List<SourceModel> imgList,
ValueChanged<int>? onDismissed, ValueChanged<int>? onDismissed,
}) { }) {
bool isMemberPage = Get.currentRoute.startsWith('/member?');
Navigator.of(this).push( Navigator.of(this).push(
HeroDialogRoute( HeroDialogRoute(
builder: (context) => InteractiveviewerGallery( builder: (context) => InteractiveviewerGallery(
@@ -98,6 +99,7 @@ extension BuildContextExt on BuildContext {
initIndex: initialPage ?? 0, initIndex: initialPage ?? 0,
onPageChanged: (int pageIndex) {}, onPageChanged: (int pageIndex) {},
onDismissed: onDismissed, onDismissed: onDismissed,
setStatusBar: !isMemberPage,
), ),
), ),
); );