다운로드 화면 버튼 줄: 좁으면 다음 줄로 · '완료 시 자동 동영상 추가' 띄어쓰기 (246)

- 버그 (기기 확인): 옆으로 미는 줄이라 앞쪽 글이 잘려 '전체 선택' 과 겹쳤다 (영어 · 일본어는 아예 안 보임) - Wrap

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
묶음5
RyuJongJin 2026-10-12 01:06:15 +09:00
parent c2c523a260
commit 2239e70013
7 changed files with 36 additions and 19 deletions

View File

@ -1342,10 +1342,10 @@
"옵션": "Options",
"옵션을 저장했습니다": "Options saved",
"완료": "Done",
"완료 시 자동 동영상 추가": "Auto-add videos when done",
"완료 정리": "Clear completed",
"완료: 성공 {0} / 전체 {1}": "Done: {0} succeeded / {1} total",
"완료: 성공 {0} · 취소 {1} · 실패 {2} / 전체 {3}": "Done: {0} succeeded · {1} cancelled · {2} failed / {3} total",
"완료시 자동 동영상추가": "Auto-add videos when done",
"외부": "External",
"외부 브라우저": "External browser",
"외부 브라우저로 열기": "Open in external browser",

View File

@ -1342,10 +1342,10 @@
"옵션": "オプション",
"옵션을 저장했습니다": "オプションを保存しました",
"완료": "完了",
"완료 시 자동 동영상 추가": "完了時に動画を自動追加",
"완료 정리": "完了を整理",
"완료: 성공 {0} / 전체 {1}": "完了: 成功 {0} / 全体 {1}",
"완료: 성공 {0} · 취소 {1} · 실패 {2} / 전체 {3}": "完了: 成功 {0} · 取消 {1} · 失敗 {2} / 全 {3}",
"완료시 자동 동영상추가": "完了時に動画を自動追加",
"외부": "外部",
"외부 브라우저": "外部ブラウザー",
"외부 브라우저로 열기": "外部ブラウザーで開く",

View File

@ -1342,10 +1342,10 @@
"옵션": "选项",
"옵션을 저장했습니다": "已保存选项",
"완료": "完成",
"완료 시 자동 동영상 추가": "完成后自动添加视频",
"완료 정리": "清理已完成",
"완료: 성공 {0} / 전체 {1}": "完成: 成功 {0} / 共 {1}",
"완료: 성공 {0} · 취소 {1} · 실패 {2} / 전체 {3}": "完成:成功 {0} · 取消 {1} · 失败 {2} / 共 {3}",
"완료시 자동 동영상추가": "完成后自动添加视频",
"외부": "外部",
"외부 브라우저": "外部浏览器",
"외부 브라우저로 열기": "在外部浏览器中打开",

View File

@ -38,7 +38,7 @@ class DownloadManager extends ChangeNotifier {
/// 받은 동영상을 편집 목록(MKV 만들기)에 넣는 함수 (새로 넣은 개수를 돌려줌). 앱이 연결해 준다.
Future<int> Function(List<String> files)? addToEditList;
/// "완료시 자동 동영상추가" 를 켜고 끄는 함수 (설정에 저장). 앱이 연결해 준다.
/// "완료 시 자동 동영상 추가" 를 켜고 끄는 함수 (설정에 저장). 앱이 연결해 준다.
Future<void> Function(bool on)? setAutoAdd;
/// 설정이 바뀌었을 때 화면 갱신

View File

@ -119,11 +119,12 @@ class _DownloadsPageState extends State<DownloadsPage> {
Container(
color: JjColors.bg,
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
child: Row(children: [
// 246: 좁으면 (폰 가로 등) 버튼들을 다음 줄로 - 예전에는 옆으로 미는 줄이라 앞쪽 글이 잘려 "전체 선택" 옆에 겹쳐 보였다
child: Wrap(alignment: WrapAlignment.spaceBetween, crossAxisAlignment: WrapCrossAlignment.center, children: [
InkWell(
borderRadius: BorderRadius.circular(4),
onTap: d.tasks.isEmpty ? null : () => allSel ? d.selectNone() : d.selectAll(),
child: Row(children: [
child: Row(mainAxisSize: MainAxisSize.min, children: [
Checkbox(
value: allSel ? true : (hasSel ? null : false),
tristate: true,
@ -136,12 +137,7 @@ class _DownloadsPageState extends State<DownloadsPage> {
),
]),
),
// 좁으면 옆으로 밀어 볼 수 있게 (오른쪽 끝부터 보임)
Expanded(
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
reverse: true,
child: Row(children: [
Wrap(alignment: WrapAlignment.end, crossAxisAlignment: WrapCrossAlignment.center, children: [
if (d.addToEditList != null) ...[
_btn(Icons.playlist_add, tr('동영상 추가'),
hasSel && d.selectedVideoFiles.isNotEmpty ? () => _addToEditList(context) : null),
@ -160,7 +156,7 @@ class _DownloadsPageState extends State<DownloadsPage> {
),
Padding(
padding: EdgeInsets.only(right: 8),
child: Text(tr('완료시 자동 동영상추가'), style: TextStyle(fontSize: 12)),
child: Text(tr('완료 시 자동 동영상 추가'), style: TextStyle(fontSize: 12)),
),
]),
),
@ -175,9 +171,7 @@ class _DownloadsPageState extends State<DownloadsPage> {
const SizedBox(width: 12),
_btn(Icons.cleaning_services_outlined, tr('완료 정리'),
d.tasks.any((t) => !t.unfinished) ? d.cleanupFinished : null),
]),
),
),
]),
]),
),
const Divider(height: 1),

View File

@ -762,7 +762,7 @@ class _SettingsPageState extends State<SettingsPage> {
SwitchListTile(
value: s.addFinishedDownloads,
onChanged: (v) => c.updateSettings((x) => x.addFinishedDownloads = v),
title: Text(tr('완료시 자동 동영상추가')),
title: Text(tr('완료 시 자동 동영상 추가')),
subtitle: Text(tr('다 받는 대로 MKV 만들기의 동영상 목록에 넣고, 다운로드 목록에서는 뺍니다 (다운로드 화면의 체크 상자와 같음)')),
),
SettingTile(

View File

@ -374,7 +374,7 @@ void main() {
d.dispose();
});
testWidgets('다운로드 화면: "완료시 자동 동영상추가" 체크 → 설정 변경, 목록에서 빼기', (tester) async {
testWidgets('다운로드 화면: "완료 시 자동 동영상 추가" 체크 → 설정 변경, 목록에서 빼기', (tester) async {
tester.view.physicalSize = const Size(1500, 900);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
@ -391,7 +391,7 @@ void main() {
Checkbox box() => tester.widget<Checkbox>(
find.descendant(of: find.byTooltip(RegExp('MKV 만들기의 동영상 목록에 자동으로')), matching: find.byType(Checkbox)));
expect(box().value, isFalse);
await tester.tap(find.text('완료시 자동 동영상추가'));
await tester.tap(find.text('완료 시 자동 동영상 추가'));
await tester.pump();
expect(s.addFinishedDownloads, isTrue);
expect(box().value, isTrue);
@ -404,6 +404,29 @@ void main() {
d.dispose();
});
testWidgets('246: 폰 가로 (약 800×411) 다운로드 화면 - 버튼 줄의 글이 잘리거나 "전체 선택" 과 겹치지 않는다', (tester) async {
tester.view.physicalSize = const Size(800, 411);
tester.view.devicePixelRatio = 1;
addTearDown(tester.view.reset);
final s = AppSettings();
final d = DownloadManager(backends: [_Backend()], settings: () => s, readClipboard: () async => null);
addTearDown(d.dispose);
d.addToEditList = (files) async => files.length;
d.setAutoAdd = (on) async => s.addFinishedDownloads = on;
d.addPage('https://vimeo.com/1')!.title = '영상';
await tester.pumpWidget(MaterialApp(home: DownloadsPage(d: d)));
await tester.pump();
expect(tester.takeException(), isNull);
final all = tester.getRect(find.text('전체 선택'));
final auto = tester.getRect(find.text('완료 시 자동 동영상 추가'));
expect(auto.overlaps(all), isFalse, reason: '$auto · $all');
expect([auto.left >= 0, auto.right <= 800], [true, true], reason: '화면 안에 다 보임 $auto');
for (final t in ['일시정지', '재개', '다운로드 취소', '삭제', '완료 정리']) {
final r = tester.getRect(find.text(t).first);
expect([r.left >= 0, r.right <= 800], [true, true], reason: '$t $r');
}
});
testWidgets('환경 설정 · 종료 버튼: 모든 화면에서 같은 자리', (tester) async {
tester.view.physicalSize = const Size(1500, 900);
tester.view.devicePixelRatio = 1;