From 91627df804ac3aeede4cc96fcbc9e66fa5a686c5 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 26 Aug 2025 18:16:32 +0800 Subject: [PATCH] tweak Signed-off-by: bggRGjQaUbCoE --- lib/pages/article/view.dart | 4 +-- lib/pages/common/dyn/common_dyn_page.dart | 16 ++++++---- lib/pages/dynamics_detail/view.dart | 2 +- lib/pages/fav_panel/view.dart | 36 +++++++---------------- lib/pages/group_panel/view.dart | 8 ++--- lib/pages/match_info/view.dart | 18 ++++++++++-- lib/pages/member/view.dart | 2 +- lib/pages/rcmd/view.dart | 2 +- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/pages/article/view.dart b/lib/pages/article/view.dart index 8ec81621..7a294d1d 100644 --- a/lib/pages/article/view.dart +++ b/lib/pages/article/view.dart @@ -71,7 +71,7 @@ class _ArticlePageState extends CommonDynPageState { final theme = Theme.of(context); final size = MediaQuery.sizeOf(context); final maxWidth = size.width; - final isPortrait = size.height >= maxWidth; + isPortrait = size.height >= maxWidth; return Scaffold( resizeToAvoidBottomInset: false, appBar: _buildAppBar(isPortrait, maxWidth), @@ -441,7 +441,7 @@ class _ArticlePageState extends CommonDynPageState { replyItem: response[index], replyLevel: 1, replyReply: (replyItem, id) => - replyReply(context, replyItem, id), + replyReply(context, replyItem, id, theme), onReply: (replyItem) => controller.onReply( context, replyItem: replyItem, diff --git a/lib/pages/common/dyn/common_dyn_page.dart b/lib/pages/common/dyn/common_dyn_page.dart index 0e31326a..d9df85cf 100644 --- a/lib/pages/common/dyn/common_dyn_page.dart +++ b/lib/pages/common/dyn/common_dyn_page.dart @@ -31,6 +31,7 @@ abstract class CommonDynPageState extends State dynamic get arguments; late EdgeInsets padding; + late bool isPortrait; @override void didChangeDependencies() { @@ -127,7 +128,7 @@ abstract class CommonDynPageState extends State replyItem: response[index], replyLevel: 1, replyReply: (replyItem, id) => - replyReply(context, replyItem, id), + replyReply(context, replyItem, id, theme), onReply: (replyItem) => controller.onReply( context, replyItem: replyItem, @@ -159,7 +160,12 @@ abstract class CommonDynPageState extends State }; } - void replyReply(BuildContext context, ReplyInfo replyItem, int? id) { + void replyReply( + BuildContext context, + ReplyInfo replyItem, + int? id, + ThemeData theme, + ) { EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () { int oid = replyItem.oid.toInt(); int rpid = replyItem.id.toInt(); @@ -182,9 +188,7 @@ abstract class CommonDynPageState extends State ], shape: Border( bottom: BorderSide( - color: Theme.of( - context, - ).colorScheme.outline.withValues(alpha: 0.1), + color: theme.colorScheme.outline.withValues(alpha: 0.1), ), ), ), @@ -198,7 +202,7 @@ abstract class CommonDynPageState extends State firstFloor: replyItem, ), ); - if (this.context.isPortrait) { + if (isPortrait) { Get.to( replyReplyPage, routeName: 'dynamicDetail-Copy', diff --git a/lib/pages/dynamics_detail/view.dart b/lib/pages/dynamics_detail/view.dart index fdd15871..51382d33 100644 --- a/lib/pages/dynamics_detail/view.dart +++ b/lib/pages/dynamics_detail/view.dart @@ -55,7 +55,7 @@ class _DynamicDetailPageState extends CommonDynPageState { final theme = Theme.of(context); final size = MediaQuery.sizeOf(context); final maxWidth = size.width; - final isPortrait = size.height >= maxWidth; + isPortrait = size.height >= maxWidth; return Scaffold( resizeToAvoidBottomInset: false, appBar: _buildAppBar(isPortrait, maxWidth), diff --git a/lib/pages/fav_panel/view.dart b/lib/pages/fav_panel/view.dart index 0b041d14..06b63eb0 100644 --- a/lib/pages/fav_panel/view.dart +++ b/lib/pages/fav_panel/view.dart @@ -95,7 +95,7 @@ class _FavPanelState extends State { @override Widget build(BuildContext context) { - final theme = Theme.of(context); + final theme = Theme.of(context).colorScheme; return Column( children: [ AppBar( @@ -117,7 +117,7 @@ class _FavPanelState extends State { }), icon: Icon( Icons.add, - color: theme.colorScheme.primary, + color: theme.primary, ), label: const Text('新建收藏夹'), style: TextButton.styleFrom( @@ -134,7 +134,7 @@ class _FavPanelState extends State { Expanded(child: _buildBody), Divider( height: 1, - color: theme.disabledColor.withValues(alpha: 0.08), + color: theme.outline.withValues(alpha: 0.1), ), Padding( padding: EdgeInsets.only( @@ -144,39 +144,25 @@ class _FavPanelState extends State { bottom: MediaQuery.viewPaddingOf(context).bottom + 12, ), child: Row( + spacing: 25, mainAxisAlignment: MainAxisAlignment.end, - children: [ - TextButton( + children: [ + FilledButton.tonal( onPressed: Get.back, - style: TextButton.styleFrom( - padding: const EdgeInsets.symmetric( - horizontal: 20, - vertical: 10, - ), - visualDensity: const VisualDensity( - horizontal: -1, - vertical: -2, - ), - foregroundColor: theme.colorScheme.outline, - backgroundColor: theme.colorScheme.onInverseSurface, + style: FilledButton.styleFrom( + visualDensity: VisualDensity.compact, + foregroundColor: theme.outline, + backgroundColor: theme.onInverseSurface, ), child: const Text('取消'), ), - const SizedBox(width: 25), FilledButton.tonal( onPressed: () { feedBack(); widget.ctr.actionFavVideo(); }, style: FilledButton.styleFrom( - padding: const EdgeInsets.symmetric( - horizontal: 20, - vertical: 10, - ), - visualDensity: const VisualDensity( - horizontal: -1, - vertical: -2, - ), + visualDensity: VisualDensity.compact, ), child: const Text('完成'), ), diff --git a/lib/pages/group_panel/view.dart b/lib/pages/group_panel/view.dart index 00831821..7a3eb751 100644 --- a/lib/pages/group_panel/view.dart +++ b/lib/pages/group_panel/view.dart @@ -145,12 +145,10 @@ class _GroupPanelState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - TextButton( + FilledButton.tonal( onPressed: onSave, - style: TextButton.styleFrom( - padding: const EdgeInsets.only(left: 30, right: 30), - foregroundColor: theme.colorScheme.onPrimary, - backgroundColor: theme.colorScheme.primary, + style: FilledButton.styleFrom( + visualDensity: VisualDensity.compact, ), child: Obx(() => Text(showDefaultBtn.value ? '保存至默认分组' : '保存')), ), diff --git a/lib/pages/match_info/view.dart b/lib/pages/match_info/view.dart index 2394ce6f..10b9d69d 100644 --- a/lib/pages/match_info/view.dart +++ b/lib/pages/match_info/view.dart @@ -228,7 +228,7 @@ class _MatchInfoPageState extends CommonDynPageState { replyItem: response[index], replyLevel: 1, replyReply: (replyItem, id) => - replyReply(context, replyItem, id), + replyReply(context, replyItem, id, theme), onReply: (replyItem) => controller.onReply( context, replyItem: replyItem, @@ -258,14 +258,26 @@ class _MatchInfoPageState extends CommonDynPageState { } @override - void replyReply(BuildContext context, ReplyInfo replyItem, int? id) { + void replyReply( + BuildContext context, + ReplyInfo replyItem, + int? id, + ThemeData theme, + ) { EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () { int oid = replyItem.oid.toInt(); int rpid = replyItem.id.toInt(); Get.to( Scaffold( resizeToAvoidBottomInset: false, - appBar: AppBar(title: const Text('评论详情')), + appBar: AppBar( + title: const Text('评论详情'), + shape: Border( + bottom: BorderSide( + color: theme.colorScheme.outline.withValues(alpha: 0.1), + ), + ), + ), body: ViewSafeArea( child: VideoReplyReplyPanel( enableSlide: false, diff --git a/lib/pages/member/view.dart b/lib/pages/member/view.dart index 309fe091..5b5e5828 100644 --- a/lib/pages/member/view.dart +++ b/lib/pages/member/view.dart @@ -75,7 +75,7 @@ class _MemberPageState extends State { children: [ if ((_userController.tab2?.length ?? 0) > 1) SizedBox( - height: 40, + height: 45, child: TabBar( controller: _userController.tabController, tabs: _userController.tabs, diff --git a/lib/pages/rcmd/view.dart b/lib/pages/rcmd/view.dart index c371e5a0..708b4955 100644 --- a/lib/pages/rcmd/view.dart +++ b/lib/pages/rcmd/view.dart @@ -41,7 +41,7 @@ class _RcmdPageState extends CommonPageState SliverPadding( padding: EdgeInsets.only( top: StyleString.cardSpace, - bottom: MediaQuery.viewPaddingOf(context).bottom, + bottom: MediaQuery.viewPaddingOf(context).bottom + 100, ), sliver: Obx(() => _buildBody(controller.loadingState.value)), ),