diff --git a/lib/common/constants.dart b/lib/common/constants.dart index f0baddb9..d321b903 100644 --- a/lib/common/constants.dart +++ b/lib/common/constants.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; class StyleString { static const double cardSpace = 8; - static const double safeSpace = 14; - static BorderRadius mdRadius = BorderRadius.circular(16); - static const Radius imgRadius = Radius.circular(16); + static const double safeSpace = 12; + static BorderRadius mdRadius = BorderRadius.circular(10); + static const Radius imgRadius = Radius.circular(10); static const double aspectRatio = 16 / 10; } diff --git a/lib/common/skeleton/video_card_v.dart b/lib/common/skeleton/video_card_v.dart index 859f95aa..956479ef 100644 --- a/lib/common/skeleton/video_card_v.dart +++ b/lib/common/skeleton/video_card_v.dart @@ -53,7 +53,7 @@ class VideoCardVSkeleton extends StatelessWidget { ), Container( width: 80, - height: 13, + height: 12, color: Theme.of(context).colorScheme.background, ), ], diff --git a/lib/common/widgets/video_card_h.dart b/lib/common/widgets/video_card_h.dart index 5d48f022..f1ae8832 100644 --- a/lib/common/widgets/video_card_h.dart +++ b/lib/common/widgets/video_card_h.dart @@ -136,7 +136,7 @@ class VideoContent extends StatelessWidget { textAlign: TextAlign.start, style: TextStyle( fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w500, letterSpacing: 0.3, ), maxLines: 2, diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index ac8715cb..10d1f9a6 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -118,7 +118,7 @@ class VideoContent extends StatelessWidget { return Expanded( child: Padding( // 多列 - padding: const EdgeInsets.fromLTRB(4, 5, 6, 12), + padding: const EdgeInsets.fromLTRB(4, 5, 6, 10), // 单列 // padding: const EdgeInsets.fromLTRB(14, 10, 4, 8), child: Column( @@ -130,91 +130,91 @@ class VideoContent extends StatelessWidget { textAlign: TextAlign.start, style: TextStyle( fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w500, letterSpacing: 0.3, ), maxLines: Get.find().crossAxisCount, overflow: TextOverflow.ellipsis, ), - // SizedBox( - // height: 18, - // child: Row( - // children: [ - // if (videoItem.rcmdReason != null && - // videoItem.rcmdReason.content != '') ...[ - // Container( - // padding: const EdgeInsets.fromLTRB(3, 1, 3, 1), - // decoration: BoxDecoration( - // color: Theme.of(context) - // .colorScheme - // .primaryContainer - // .withOpacity(0.6), - // borderRadius: BorderRadius.circular(3)), - // child: Text( - // videoItem.rcmdReason.content, - // style: TextStyle( - // fontSize: - // Theme.of(context).textTheme.labelSmall!.fontSize, - // color: Theme.of(context).colorScheme.primary, - // ), - // ), - // ), - // const SizedBox(width: 4) - // ] else if (videoItem.isFollowed == 1) ...[ - // Container( - // padding: const EdgeInsets.fromLTRB(3, 1, 3, 1), - // decoration: BoxDecoration( - // color: Theme.of(context) - // .colorScheme - // .primaryContainer - // .withOpacity(0.6), - // borderRadius: BorderRadius.circular(3)), - // child: Text( - // '已关注', - // style: TextStyle( - // fontSize: - // Theme.of(context).textTheme.labelSmall!.fontSize, - // color: Theme.of(context).colorScheme.primary, - // ), - // ), - // ), - // const SizedBox(width: 4) - // ], - // Expanded( - // child: LayoutBuilder(builder: - // (BuildContext context, BoxConstraints constraints) { - // return SizedBox( - // width: constraints.maxWidth, - // child: Text( - // videoItem.owner.name, - // maxLines: 1, - // style: TextStyle( - // fontSize: Theme.of(context) - // .textTheme - // .labelMedium! - // .fontSize, - // color: Theme.of(context).colorScheme.outline, - // ), - // ), - // ); - // }), - // ), - // ], - // ), - // ), - Row( - children: [ - StatView( - theme: 'black', - view: videoItem.stat.view, - ), - const SizedBox(width: 6), - StatDanMu( - theme: 'black', - danmu: videoItem.stat.danmaku, - ), - ], + SizedBox( + height: 18, + child: Row( + children: [ + if (videoItem.rcmdReason != null && + videoItem.rcmdReason.content != '') ...[ + Container( + padding: const EdgeInsets.fromLTRB(3, 1, 3, 1), + decoration: BoxDecoration( + color: Theme.of(context) + .colorScheme + .primaryContainer + .withOpacity(0.6), + borderRadius: BorderRadius.circular(3)), + child: Text( + videoItem.rcmdReason.content, + style: TextStyle( + fontSize: + Theme.of(context).textTheme.labelSmall!.fontSize, + color: Theme.of(context).colorScheme.primary, + ), + ), + ), + const SizedBox(width: 4) + ] else if (videoItem.isFollowed == 1) ...[ + Container( + padding: const EdgeInsets.fromLTRB(3, 1, 3, 1), + decoration: BoxDecoration( + color: Theme.of(context) + .colorScheme + .primaryContainer + .withOpacity(0.6), + borderRadius: BorderRadius.circular(3)), + child: Text( + '已关注', + style: TextStyle( + fontSize: + Theme.of(context).textTheme.labelSmall!.fontSize, + color: Theme.of(context).colorScheme.primary, + ), + ), + ), + const SizedBox(width: 4) + ], + Expanded( + child: LayoutBuilder(builder: + (BuildContext context, BoxConstraints constraints) { + return SizedBox( + width: constraints.maxWidth, + child: Text( + videoItem.owner.name, + maxLines: 1, + style: TextStyle( + fontSize: Theme.of(context) + .textTheme + .labelMedium! + .fontSize, + color: Theme.of(context).colorScheme.outline, + ), + ), + ); + }), + ), + ], + ), ), + // Row( + // children: [ + // StatView( + // theme: 'black', + // view: videoItem.stat.view, + // ), + // const SizedBox(width: 6), + // StatDanMu( + // theme: 'black', + // danmu: videoItem.stat.danmaku, + // ), + // ], + // ), ], ), ), diff --git a/lib/pages/dynamics/deatil/view.dart b/lib/pages/dynamics/deatil/view.dart index de40a43e..36c28680 100644 --- a/lib/pages/dynamics/deatil/view.dart +++ b/lib/pages/dynamics/deatil/view.dart @@ -77,8 +77,12 @@ class _DynamicDetailPageState extends State { Get.to( () => Scaffold( appBar: AppBar( - title: const Text('评论详情'), + titleSpacing: 0, centerTitle: false, + title: Text( + '评论详情', + style: Theme.of(context).textTheme.titleMedium, + ), ), body: VideoReplyReplyPanel( oid: oid, diff --git a/lib/pages/favDetail/widget/fav_video_card.dart b/lib/pages/favDetail/widget/fav_video_card.dart index 8bf12f8a..41538b65 100644 --- a/lib/pages/favDetail/widget/fav_video_card.dart +++ b/lib/pages/favDetail/widget/fav_video_card.dart @@ -136,8 +136,10 @@ class VideoContent extends StatelessWidget { videoItem.title, textAlign: TextAlign.start, style: TextStyle( - fontSize: Theme.of(context).textTheme.titleSmall!.fontSize, - fontWeight: FontWeight.w500), + fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, + fontWeight: FontWeight.w500, + letterSpacing: 0.3, + ), maxLines: 2, overflow: TextOverflow.ellipsis, ), diff --git a/lib/pages/follow/view.dart b/lib/pages/follow/view.dart index 714b9300..230bec94 100644 --- a/lib/pages/follow/view.dart +++ b/lib/pages/follow/view.dart @@ -43,8 +43,12 @@ class _FollowPageState extends State { appBar: AppBar( elevation: 0, scrolledUnderElevation: 0, + titleSpacing: 0, centerTitle: false, - title: const Text('我的关注'), + title: Text( + '我的关注', + style: Theme.of(context).textTheme.titleMedium, + ), ), body: RefreshIndicator( onRefresh: () async => diff --git a/lib/pages/history/widgets/item.dart b/lib/pages/history/widgets/item.dart index 2d8b2ea4..0f7a3532 100644 --- a/lib/pages/history/widgets/item.dart +++ b/lib/pages/history/widgets/item.dart @@ -152,8 +152,10 @@ class VideoContent extends StatelessWidget { videoItem.title, textAlign: TextAlign.start, style: TextStyle( - fontSize: Theme.of(context).textTheme.titleSmall!.fontSize, - fontWeight: FontWeight.w500), + fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, + fontWeight: FontWeight.w500, + letterSpacing: 0.3, + ), maxLines: videoItem.videos > 1 ? 1 : 2, overflow: TextOverflow.ellipsis, ), diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart index f27b6a50..3a265c84 100644 --- a/lib/pages/home/view.dart +++ b/lib/pages/home/view.dart @@ -29,7 +29,7 @@ class _HomePageState extends State appBar: AppBar( titleSpacing: 0, title: Padding( - padding: const EdgeInsets.only(left: 12, right: 12, bottom: 8), + padding: const EdgeInsets.only(left: 12, right: 12, bottom: 0), child: Stack( children: [ const Align( @@ -79,12 +79,15 @@ class _HomePageState extends State indicatorPadding: const EdgeInsets.symmetric( horizontal: 4, vertical: 5), indicator: BoxDecoration( - color: Theme.of(context).colorScheme.primary, + color: Theme.of(context) + .colorScheme + .primaryContainer + .withOpacity(0.8), borderRadius: const BorderRadius.all(Radius.circular(20)), ), indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).colorScheme.onPrimary, + labelColor: Theme.of(context).colorScheme.primary, labelStyle: const TextStyle(fontSize: 13), dividerColor: Colors.transparent, unselectedLabelColor: diff --git a/lib/pages/later/view.dart b/lib/pages/later/view.dart index dd435363..d02c9d0d 100644 --- a/lib/pages/later/view.dart +++ b/lib/pages/later/view.dart @@ -26,8 +26,12 @@ class _LaterPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: const Text('稍后再看'), + titleSpacing: 0, centerTitle: false, + title: Text( + '稍后再看', + style: Theme.of(context).textTheme.titleMedium, + ), ), body: CustomScrollView( controller: _laterController.scrollController, diff --git a/lib/pages/live/widgets/live_item.dart b/lib/pages/live/widgets/live_item.dart index 3446c685..66608bd6 100644 --- a/lib/pages/live/widgets/live_item.dart +++ b/lib/pages/live/widgets/live_item.dart @@ -24,10 +24,10 @@ class LiveCardV extends StatelessWidget { String heroTag = Utils.makeHeroTag(liveItem.roomId); return Card( elevation: 0, - // clipBehavior: Clip.hardEdge, - // shape: RoundedRectangleBorder( - // borderRadius: StyleString.mdRadius, - // ), + clipBehavior: Clip.hardEdge, + shape: RoundedRectangleBorder( + borderRadius: StyleString.mdRadius, + ), margin: EdgeInsets.zero, child: GestureDetector( onLongPress: () { @@ -114,7 +114,7 @@ class LiveContent extends StatelessWidget { textAlign: TextAlign.start, style: TextStyle( fontSize: Theme.of(context).textTheme.labelMedium!.fontSize, - fontWeight: FontWeight.w600, + fontWeight: FontWeight.w500, letterSpacing: 0.3, ), maxLines: 2, diff --git a/lib/pages/video/detail/introduction/view.dart b/lib/pages/video/detail/introduction/view.dart index 0458d396..b0c4e08c 100644 --- a/lib/pages/video/detail/introduction/view.dart +++ b/lib/pages/video/detail/introduction/view.dart @@ -157,7 +157,7 @@ class _VideoInfoState extends State with TickerProviderStateMixin { .titleMedium! .copyWith( letterSpacing: 0.5, - fontWeight: FontWeight.bold), + fontWeight: FontWeight.w500), maxLines: 2, overflow: TextOverflow.ellipsis, ), @@ -238,10 +238,11 @@ class _VideoInfoState extends State with TickerProviderStateMixin { seasonPanel(widget.videoDetail!.ugcSeason!, widget.videoDetail!.pages!.first.cid, sheetHeight) ], - Divider( - height: 26, - color: Theme.of(context).dividerColor.withOpacity(0.1), - ), + // Divider( + // height: 26, + // color: Theme.of(context).dividerColor.withOpacity(0.1), + // ), + const SizedBox(height: 20), GestureDetector( onTap: () { int mid = !widget.loadingStatus @@ -257,6 +258,7 @@ class _VideoInfoState extends State with TickerProviderStateMixin { }, child: Row( children: [ + const SizedBox(width: 5), NetworkImgLayer( type: 'avatar', src: !widget.loadingStatus @@ -293,17 +295,48 @@ class _VideoInfoState extends State with TickerProviderStateMixin { opacity: widget.loadingStatus ? 0 : 1, duration: const Duration(milliseconds: 150), child: SizedBox( - height: 34, + height: 32, child: Obx( () => videoIntroController.followStatus.isNotEmpty - ? ElevatedButton( + ? TextButton( onPressed: () => videoIntroController .actionRelationMod(), - child: Text(videoIntroController - .followStatus['attribute'] == - 0 - ? '关注' - : '已关注'), + style: TextButton.styleFrom( + padding: const EdgeInsets.only( + left: 8, right: 8), + foregroundColor: + videoIntroController.followStatus[ + 'attribute'] != + 0 + ? Theme.of(context) + .colorScheme + .outline + : Theme.of(context) + .colorScheme + .onPrimary, + backgroundColor: + videoIntroController.followStatus[ + 'attribute'] != + 0 + ? Theme.of(context) + .colorScheme + .onInverseSurface + : Theme.of(context) + .colorScheme + .primary, // 设置按钮背景色 + ), + child: Text( + videoIntroController.followStatus[ + 'attribute'] != + 0 + ? '已关注' + : '关注', + style: TextStyle( + fontSize: Theme.of(context) + .textTheme + .labelMedium! + .fontSize), + ), ) : ElevatedButton( onPressed: () => videoIntroController @@ -313,14 +346,15 @@ class _VideoInfoState extends State with TickerProviderStateMixin { ), ), ), + const SizedBox(width: 4) ], ), ), - const SizedBox(height: 8), - Divider( - height: 12, - color: Theme.of(context).dividerColor.withOpacity(0.1), - ), + const SizedBox(height: 12), + // Divider( + // height: 12, + // color: Theme.of(context).dividerColor.withOpacity(0.1), + // ), ], ) : const SizedBox( diff --git a/lib/pages/video/detail/introduction/widgets/intro_detail.dart b/lib/pages/video/detail/introduction/widgets/intro_detail.dart index 478a1c2e..6daeca9a 100644 --- a/lib/pages/video/detail/introduction/widgets/intro_detail.dart +++ b/lib/pages/video/detail/introduction/widgets/intro_detail.dart @@ -28,7 +28,7 @@ class IntroDetail extends StatelessWidget { child: Column( children: [ Container( - height: 25, + height: 40, padding: const EdgeInsets.only(bottom: 2), child: Center( child: Container( @@ -51,7 +51,7 @@ class IntroDetail extends StatelessWidget { Text( videoDetail!.title, style: Theme.of(context).textTheme.titleMedium!.copyWith( - letterSpacing: 0.5, fontWeight: FontWeight.bold), + letterSpacing: 0.5, fontWeight: FontWeight.w500), ), const SizedBox(height: 10), Row( diff --git a/lib/pages/video/detail/introduction/widgets/season.dart b/lib/pages/video/detail/introduction/widgets/season.dart index a5f74af2..f4400294 100644 --- a/lib/pages/video/detail/introduction/widgets/season.dart +++ b/lib/pages/video/detail/introduction/widgets/season.dart @@ -75,21 +75,28 @@ Widget seasonPanel(UgcSeason ugcSeason, cid, sheetHeight) { ), ), child: Padding( - padding: const EdgeInsets.fromLTRB(10, 10, 10, 10), + padding: const EdgeInsets.fromLTRB(8, 12, 8, 12), child: Row( children: [ Expanded( child: Text( '合集:${ugcSeason.title!}', + style: Theme.of(context).textTheme.labelMedium, overflow: TextOverflow.ellipsis, ), ), const SizedBox(width: 15), + Image.asset( + 'assets/images/live.gif', + color: Theme.of(context).colorScheme.primary, + height: 11, + ), + const SizedBox(width: 4), Text( '${currentIndex + 1} / ${ugcSeason.epCount}', - style: Theme.of(context).textTheme.labelSmall, + style: Theme.of(context).textTheme.labelMedium, ), - const SizedBox(width: 2), + const SizedBox(width: 6), const Icon( Icons.arrow_forward_ios_outlined, size: 13,