style(player): 播放页与首页浮层的控件样式统一
播放页顶部按钮与选集条去掉底色、进度条不再画滑块圆点并压到最底部; 剧名与简介收在互动栏左侧,清屏后只留右下角退出按钮。 首页观看条与进度条共用 20pt 页边距,进度槽底色与播放页一致。
This commit is contained in:
1 parent
d5bcda54d3
commit
543d0aadd5
12 files changed
+298
-297
No files matched your search
@@ -37,11 +37,8 @@ void main() {
|
||||
expect(find.byKey(const Key('scrub-overlay')), findsNothing);
|
||||
expect(harness.scrubStarts, 1);
|
||||
expect(_sliderTheme(tester).trackHeight, 6);
|
||||
expect(
|
||||
(_sliderTheme(tester).thumbShape! as RoundSliderThumbShape)
|
||||
.enabledThumbRadius,
|
||||
8,
|
||||
);
|
||||
// 不画滑块圆点,进度只靠已播段表达。
|
||||
expect(_sliderTheme(tester).thumbShape, SliderComponentShape.noThumb);
|
||||
|
||||
await gesture.moveBy(const Offset(72, 0));
|
||||
await tester.pump();
|
||||
@@ -67,11 +64,7 @@ void main() {
|
||||
expect(harness.scrubEnds, 1);
|
||||
expect(harness.seeks, 1);
|
||||
expect(_sliderTheme(tester).trackHeight, 2);
|
||||
expect(
|
||||
(_sliderTheme(tester).thumbShape! as RoundSliderThumbShape)
|
||||
.enabledThumbRadius,
|
||||
6,
|
||||
);
|
||||
expect(_sliderTheme(tester).thumbShape, SliderComponentShape.noThumb);
|
||||
});
|
||||
|
||||
testWidgets('feed progress tap does not clear overlay content', (
|
||||
@@ -154,29 +147,27 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
|
||||
testWidgets('feed progress thumb stays on the finger when dragged right', (
|
||||
tester,
|
||||
) async {
|
||||
await _pumpFeedOverlay(tester);
|
||||
final bar = find.byKey(const Key('home-feed-progress'));
|
||||
final gesture = await tester.startGesture(tester.getCenter(bar));
|
||||
testWidgets(
|
||||
'feed progress played segment follows the finger when dragged right',
|
||||
(tester) async {
|
||||
await _pumpFeedOverlay(tester);
|
||||
final bar = find.byKey(const Key('home-feed-progress'));
|
||||
final gesture = await tester.startGesture(tester.getCenter(bar));
|
||||
|
||||
await gesture.moveBy(const Offset(800, 0));
|
||||
await tester.pump();
|
||||
await gesture.moveBy(const Offset(800, 0));
|
||||
await tester.pump();
|
||||
|
||||
final thumbCenter = tester
|
||||
.getRect(find.byKey(const Key('home-feed-progress-thumb')))
|
||||
.center
|
||||
.dx;
|
||||
final playedRight = tester
|
||||
.getRect(find.byKey(const Key('home-feed-progress-played')))
|
||||
.right;
|
||||
expect(thumbCenter, closeTo(tester.getRect(bar).right, 0.5));
|
||||
expect(playedRight, closeTo(thumbCenter, 0.5));
|
||||
expect(
|
||||
tester
|
||||
.getRect(find.byKey(const Key('home-feed-progress-played')))
|
||||
.right,
|
||||
closeTo(tester.getRect(bar).right, 0.5),
|
||||
);
|
||||
|
||||
await gesture.up();
|
||||
await tester.pumpAndSettle();
|
||||
});
|
||||
await gesture.up();
|
||||
await tester.pumpAndSettle();
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('full player drag clears chrome and release restores it', (
|
||||
tester,
|
||||
|
||||
Reference in new issue
Block a user