merge: 合并 K29.1 浅色播放页底栏

This commit is contained in:
Zhou Weidong committed 2026-10-20 11:14:08 +08:00
commit 9429257d62
4 files changed
+26 -13

No files matched your search

+2 -1
View File
@@ -216,7 +216,8 @@ class _PlayerPageState extends State<PlayerPage> with WidgetsBindingObserver {
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
ColoredBox( ColoredBox(
color: AppColors.onSurface, key: const Key('player-background'),
color: AppColors.ink,
child: widget.homeMode child: widget.homeMode
? null ? null
: RemoteImage( : RemoteImage(
+7 -6
View File
@@ -167,7 +167,8 @@ class PlayerPlaybackOverlay extends StatelessWidget {
key: const Key('player-controls-bottom'), key: const Key('player-controls-bottom'),
padding: const EdgeInsets.fromLTRB(14, 8, 14, 6), padding: const EdgeInsets.fromLTRB(14, 8, 14, 6),
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: Color(0xED000000), color: AppColors.card,
border: Border(top: BorderSide(color: AppColors.border)),
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(_panelRadius), top: Radius.circular(_panelRadius),
), ),
@@ -220,7 +221,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: AppColors.onPrimary, color: AppColors.onSurface,
fontFamily: 'Outfit', fontFamily: 'Outfit',
fontSize: 18 * data.textScale, fontSize: 18 * data.textScale,
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
@@ -230,7 +231,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
const SizedBox(width: 6), const SizedBox(width: 6),
const Icon( const Icon(
Icons.chevron_right_rounded, Icons.chevron_right_rounded,
color: Colors.white70, color: AppColors.muted,
size: 20, size: 20,
), ),
], ],
@@ -262,8 +263,8 @@ class PlayerPlaybackOverlay extends StatelessWidget {
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: const TextStyle( style: const TextStyle(
color: AppColors.onPrimary, color: AppColors.onSurface,
fontSize: 12, fontSize: 11,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
@@ -271,7 +272,7 @@ class PlayerPlaybackOverlay extends StatelessWidget {
const SizedBox(width: 3), const SizedBox(width: 3),
const Icon( const Icon(
Icons.keyboard_arrow_up_rounded, Icons.keyboard_arrow_up_rounded,
color: AppColors.onPrimary, color: AppColors.onSurface,
size: 16, size: 16,
), ),
], ],
@@ -87,8 +87,8 @@ class _PipButton extends StatelessWidget {
tooltip: tooltip, tooltip: tooltip,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
style: IconButton.styleFrom( style: IconButton.styleFrom(
backgroundColor: const Color(0x80000000), backgroundColor: AppColors.raised,
foregroundColor: AppColors.onPrimary, foregroundColor: AppColors.onSurface,
), ),
onPressed: onPressed, onPressed: onPressed,
icon: const Icon(Icons.picture_in_picture_alt_rounded, size: 17), icon: const Icon(Icons.picture_in_picture_alt_rounded, size: 17),
@@ -253,7 +253,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
), ),
const Padding( const Padding(
padding: EdgeInsets.symmetric(horizontal: 6), padding: EdgeInsets.symmetric(horizontal: 6),
child: Text('|', style: TextStyle(color: Colors.white38)), child: Text('|', style: TextStyle(color: AppColors.border)),
), ),
Expanded( Expanded(
child: Text( child: Text(
@@ -262,7 +262,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
maxLines: _expanded ? 3 : 1, maxLines: _expanded ? 3 : 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
color: Colors.white70, color: AppColors.muted,
fontSize: 11 * widget.textScale, fontSize: 11 * widget.textScale,
height: 1.35, height: 1.35,
), ),
@@ -273,7 +273,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
_expanded _expanded
? Icons.keyboard_arrow_up_rounded ? Icons.keyboard_arrow_up_rounded
: Icons.keyboard_arrow_down_rounded, : Icons.keyboard_arrow_down_rounded,
color: Colors.white54, color: AppColors.subtle,
size: 16, size: 16,
), ),
], ],
@@ -283,7 +283,7 @@ class _EpisodeSynopsisState extends State<_EpisodeSynopsis> {
Text( Text(
widget.authorNote, widget.authorNote,
key: const Key('player-author-note'), key: const Key('player-author-note'),
style: const TextStyle(color: Colors.white54, fontSize: 10), style: const TextStyle(color: AppColors.muted, fontSize: 10),
), ),
], ],
], ],
+11
View File
@@ -11,6 +11,7 @@ import 'package:fruitshorts/core/data/models/play_ticket.dart';
import 'package:fruitshorts/core/data/repositories/favorite_repository.dart'; import 'package:fruitshorts/core/data/repositories/favorite_repository.dart';
import 'package:fruitshorts/core/data/repositories/playback_repository.dart'; import 'package:fruitshorts/core/data/repositories/playback_repository.dart';
import 'package:fruitshorts/core/data/repositories/watch_history_repository.dart'; import 'package:fruitshorts/core/data/repositories/watch_history_repository.dart';
import 'package:fruitshorts/core/theme/app_colors.dart';
import 'package:fruitshorts/pages/player/widgets/player_center_toggle.dart'; import 'package:fruitshorts/pages/player/widgets/player_center_toggle.dart';
import 'package:fruitshorts/pages/player/widgets/seek_progress_bar.dart'; import 'package:fruitshorts/pages/player/widgets/seek_progress_bar.dart';
@@ -186,6 +187,16 @@ void main() {
final rail = tester.getRect( final rail = tester.getRect(
find.byKey(const Key('player-interaction-rail')), find.byKey(const Key('player-interaction-rail')),
); );
expect(
tester
.widget<ColoredBox>(find.byKey(const Key('player-background')))
.color,
AppColors.ink,
);
final panel = tester.widget<Container>(
find.byKey(const Key('player-controls-bottom')),
);
expect((panel.decoration! as BoxDecoration).color, AppColors.card);
expect(bottom.height, lessThanOrEqualTo(200)); expect(bottom.height, lessThanOrEqualTo(200));
expect(bottom.top, greaterThanOrEqualTo(screenHeight * 0.78)); expect(bottom.top, greaterThanOrEqualTo(screenHeight * 0.78));