style(home): 观看全集按钮改为半透明白玻璃表面
flutter-ci / test (push) Failing after 19m26s

This commit is contained in:
Zhou Weidong committed 2026-11-04 15:01:36 +08:00
1 parent b61bfe625c
commit 938435dfb9
4 files changed
+21 -8

No files matched your search

+5 -2
View File
@@ -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);
@@ -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,
+1
View File
@@ -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<Text>(find.text('Watch all')).style?.fontSize, 16);
expect(
+9 -5
View File
@@ -1,5 +1,5 @@
// Author: fruit.com.cn
// 职责:检查观看全集按钮实际绘制像素,防止配色只配置而不可见。
// 职责:检查观看全集按钮的玻璃表面确实被绘制出来。
import 'dart:typed_data';
import 'dart:ui' as ui;
@@ -29,12 +29,16 @@ Future<void> _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),
);
}
});