From 938435dfb9f7433b6415fa24faea0bdb9ac53008 Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Wed, 4 Nov 2026 15:01:36 +0800 Subject: [PATCH] =?UTF-8?q?style(home):=20=E8=A7=82=E7=9C=8B=E5=85=A8?= =?UTF-8?q?=E9=9B=86=E6=8C=89=E9=92=AE=E6=94=B9=E4=B8=BA=E5=8D=8A=E9=80=8F?= =?UTF-8?q?=E6=98=8E=E7=99=BD=E7=8E=BB=E7=92=83=E8=A1=A8=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/theme/app_colors.dart | 7 +++++-- .../player/widgets/home_feed_recommend_panel.dart | 7 ++++++- test/home/feed_info_hierarchy_test.dart | 1 + test/home/feed_watch_all_gradient_test.dart | 14 +++++++++----- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/lib/core/theme/app_colors.dart b/lib/core/theme/app_colors.dart index 51c2c20..1dac753 100644 --- a/lib/core/theme/app_colors.dart +++ b/lib/core/theme/app_colors.dart @@ -30,8 +30,11 @@ abstract final class AppColors { /// 首页及剧集播放页视频信息文案:参考设计图的 65% 半透明白。 static const homeFeedVideoCopy = Color(0xA6FFFFFF); - /// 首页观看全集按钮:品牌红压暗后的酒红表面。 - static const watchAllSurface = Color(0xFF4A2D2D); + /// 首页观看全集按钮:与浮层玻璃语言一致的半透明白表面。 + static const watchAllSurface = Color(0x26FFFFFF); + + /// 观看全集按钮的白色发丝边框。 + static const watchAllBorder = Color(0x1FFFFFFF); /// 主操作、选中态、播放进度。旧品牌橙已全量映射为品牌红(2026-10 改版)。 static const blue = Color(0xFFF04E4E); diff --git a/lib/pages/player/widgets/home_feed_recommend_panel.dart b/lib/pages/player/widgets/home_feed_recommend_panel.dart index 6d9af4c..8e20e73 100644 --- a/lib/pages/player/widgets/home_feed_recommend_panel.dart +++ b/lib/pages/player/widgets/home_feed_recommend_panel.dart @@ -208,7 +208,12 @@ class HomeFeedWatchAllBar extends StatelessWidget { borderRadius: BorderRadius.circular(_watchAllRadius), child: DecoratedBox( key: const Key('home-feed-full-series-surface'), - decoration: const BoxDecoration(color: AppColors.watchAllSurface), + decoration: const BoxDecoration( + color: AppColors.watchAllSurface, + border: Border.fromBorderSide( + BorderSide(color: AppColors.watchAllBorder), + ), + ), child: Material( key: const Key('home-feed-full-series-bg'), color: AppColors.transparent, diff --git a/test/home/feed_info_hierarchy_test.dart b/test/home/feed_info_hierarchy_test.dart index c10205b..a29afc5 100644 --- a/test/home/feed_info_hierarchy_test.dart +++ b/test/home/feed_info_hierarchy_test.dart @@ -268,6 +268,7 @@ void main() { ); final decoration = decorated.decoration as BoxDecoration; expect(decoration.color, AppColors.watchAllSurface); + expect(decoration.border?.top.color, AppColors.watchAllBorder); expect(decoration.gradient, isNull); expect(tester.widget(find.text('Watch all')).style?.fontSize, 16); expect( diff --git a/test/home/feed_watch_all_gradient_test.dart b/test/home/feed_watch_all_gradient_test.dart index 4e03593..c294208 100644 --- a/test/home/feed_watch_all_gradient_test.dart +++ b/test/home/feed_watch_all_gradient_test.dart @@ -1,5 +1,5 @@ // Author: fruit.com.cn -// 职责:检查观看全集按钮实际绘制像素,防止配色只配置而不可见。 +// 职责:检查观看全集按钮的玻璃表面确实被绘制出来。 import 'dart:typed_data'; import 'dart:ui' as ui; @@ -29,12 +29,16 @@ Future _pumpButton(WidgetTester tester) => tester.pumpWidget( localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, home: Scaffold( + backgroundColor: Colors.black, body: Center( child: RepaintBoundary( key: _boundaryKey, child: SizedBox( width: _width, - child: HomeFeedWatchAllBar(drama: _drama, onTap: () {}), + child: ColoredBox( + color: Colors.black, + child: HomeFeedWatchAllBar(drama: _drama, onTap: () {}), + ), ), ), ), @@ -73,15 +77,15 @@ void main() { expect(sample.a, 1); expect( sample.r, - closeTo(AppColors.watchAllSurface.r, _surfaceTolerance), + closeTo(AppColors.watchAllSurface.a, _surfaceTolerance), ); expect( sample.g, - closeTo(AppColors.watchAllSurface.g, _surfaceTolerance), + closeTo(AppColors.watchAllSurface.a, _surfaceTolerance), ); expect( sample.b, - closeTo(AppColors.watchAllSurface.b, _surfaceTolerance), + closeTo(AppColors.watchAllSurface.a, _surfaceTolerance), ); } });