맨 위 줄: 지금 화면 버튼 아래 밑줄
파란 아이콘 · 옅은 바탕에 더해 3px 밑줄 - 색만으로 알아보기 어려운 사람도 어디인지 알게 (좁은 · 넓은 화면 모두). batch_test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>묶음4
parent
a66f3a8823
commit
e46c73a317
|
|
@ -240,7 +240,22 @@ class AppNavButtons extends StatelessWidget {
|
||||||
};
|
};
|
||||||
// 좁은 화면 (폰): 아이콘 아래에 짧은 이름 - 글자 없는 작은 아이콘만 늘어서 무엇인지 몰랐던 것
|
// 좁은 화면 (폰): 아이콘 아래에 짧은 이름 - 글자 없는 작은 아이콘만 늘어서 무엇인지 몰랐던 것
|
||||||
final labels = isCompact(context);
|
final labels = isCompact(context);
|
||||||
Widget btn(Widget icon, String tip, VoidCallback? f, {bool here = false, String label = ''}) => labels
|
// 지금 화면 버튼 아래 밑줄 (색만으로는 알아보기 어려운 사람도 어디인지 알게)
|
||||||
|
Widget underline(Widget child, bool here) => !here
|
||||||
|
? child
|
||||||
|
: Stack(clipBehavior: Clip.none, children: [
|
||||||
|
child,
|
||||||
|
Positioned(
|
||||||
|
left: 10,
|
||||||
|
right: 10,
|
||||||
|
bottom: 0,
|
||||||
|
child: Container(
|
||||||
|
key: const ValueKey('nav-here-underline'),
|
||||||
|
height: 3,
|
||||||
|
decoration: BoxDecoration(color: JjColors.accent, borderRadius: BorderRadius.circular(2))),
|
||||||
|
),
|
||||||
|
]);
|
||||||
|
Widget btn0(Widget icon, String tip, VoidCallback? f, {bool here = false, String label = ''}) => labels
|
||||||
? Tooltip(
|
? Tooltip(
|
||||||
message: tip,
|
message: tip,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
|
@ -284,6 +299,7 @@ class AppNavButtons extends StatelessWidget {
|
||||||
onPressed: f,
|
onPressed: f,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Widget btn(Widget icon, String tip, VoidCallback? f, {bool here = false, String label = ''}) => underline(btn0(icon, tip, f, here: here, label: label), here);
|
||||||
String short(String id) => switch (id) {
|
String short(String id) => switch (id) {
|
||||||
'mkv' => 'MKV',
|
'mkv' => 'MKV',
|
||||||
'browser' => tr('브라우저'),
|
'browser' => tr('브라우저'),
|
||||||
|
|
|
||||||
|
|
@ -393,6 +393,11 @@ void main() {
|
||||||
// MKV 화면: 뒤로 · MKV 는 "지금 여기" 라 꺼짐, 다운로드 목록 열기
|
// MKV 화면: 뒤로 · MKV 는 "지금 여기" 라 꺼짐, 다운로드 목록 열기
|
||||||
expect(btn('뒤로').onPressed, isNull);
|
expect(btn('뒤로').onPressed, isNull);
|
||||||
expect(find.byTooltip('MKV 화면 (지금 여기)'), findsOneWidget);
|
expect(find.byTooltip('MKV 화면 (지금 여기)'), findsOneWidget);
|
||||||
|
// 지금 화면 버튼 아래 밑줄 하나 (그 버튼 아래에)
|
||||||
|
final line = find.byKey(const ValueKey('nav-here-underline'));
|
||||||
|
expect(line, findsOneWidget);
|
||||||
|
final mkv = tester.getRect(find.byTooltip('MKV 화면 (지금 여기)'));
|
||||||
|
expect(tester.getCenter(line).dx, closeTo(mkv.center.dx, 2));
|
||||||
await tester.tap(find.byTooltip('다운로드 목록'));
|
await tester.tap(find.byTooltip('다운로드 목록'));
|
||||||
await tester.pumpAndSettle();
|
await tester.pumpAndSettle();
|
||||||
expect(find.textContaining('다운로드 ('), findsOneWidget);
|
expect(find.textContaining('다운로드 ('), findsOneWidget);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue