From 7df43a750eebd1aa456424ae9a8a22e20e9807cd Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Sun, 11 Oct 2026 19:50:21 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8A=B8=EB=A6=AC=20=ED=99=94=EC=82=B4?= =?UTF-8?q?=ED=91=9C=20=EB=88=84=EB=A5=B4=EB=8A=94=20=EC=98=81=EC=97=AD:?= =?UTF-8?q?=20=EC=A4=84=20=EB=86=92=EC=9D=B4=20=EC=A0=84=EC=B2=B4=20=C2=B7?= =?UTF-8?q?=20Android=20=EB=8A=94=20=ED=8F=AD=2044=20(189=20=EB=B3=B4?= =?UTF-8?q?=EC=B6=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 189 로 접기 · 펼치기를 화살표로만 하게 되어, 아이콘 크기 (18px) 만 눌리던 것을 넓혔다 (관리자 지시: 손가락으로 누르기 충분히). Windows 는 폭 20 그대로 (배치가 바뀌지 않게). 시험: Android 흉내로 영역 크기 · 가장자리를 눌러도 펼침. Co-Authored-By: Claude Opus 5.5 --- lib/ui/explorer_page.dart | 20 +++++++++++++++----- test/explorer_test.dart | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/lib/ui/explorer_page.dart b/lib/ui/explorer_page.dart index dda06bb..0e8bd67 100644 --- a/lib/ui/explorer_page.dart +++ b/lib/ui/explorer_page.dart @@ -4,6 +4,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:crypto/crypto.dart'; +import 'package:flutter/foundation.dart' show defaultTargetPlatform; import 'package:flutter/gestures.dart' show kBackMouseButton, kForwardMouseButton; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -52,6 +53,10 @@ import 'explorer_bookmarks.dart'; /// /// [rsync] 면 Rsync 화면: 같은 모양이지만 늘 좌우 두 창 · 폴더만 · 창마다 폴더 하나만 고른다. /// 가운데 → (왼쪽 → 오른쪽) · ← (오른쪽 → 왼쪽) · ⇄ (둘 다 함께) 로 rsync, [모니터링] 에 실행한 것이 남는다. +/// 189: 트리 화살표 칸의 폭 - 손가락으로 누르는 기기 (Android · iOS) 는 넓게 (줄 높이와 함께 누르는 영역) +double treeChevronWidth(TargetPlatform platform) => + platform == TargetPlatform.android || platform == TargetPlatform.iOS ? 44 : 20; + class ExplorerPage extends StatefulWidget { final AppController c; final bool rsync; @@ -3189,24 +3194,29 @@ class _ExplorerPageState extends State { color: isCurrent ? JjColors.accent : null, ); - // 트리의 펼치기 화살표 (따로 누름) + final chevronWidth = treeChevronWidth(defaultTargetPlatform); + // 트리의 펼치기 화살표 (따로 누름). 189: 접기 · 펼치기는 이것으로만 하므로 줄 높이 전체를 누를 수 있게, + // 손가락으로 누르는 기기 (Android) 는 폭도 넓게 Widget chevron() => SizedBox( - width: 20, + width: chevronWidth, + height: look.rowHeight, child: e.isDir && !list && !row.isUp ? (loading ? const Center( child: SizedBox(width: 12, height: 12, child: CircularProgressIndicator(strokeWidth: 1.5))) : InkResponse( - radius: 16, + radius: chevronWidth / 2 + 4, + containedInkWell: false, onTap: () => _toggle(pane, e), - child: Icon(open ? Icons.expand_more : Icons.chevron_right, size: 18, color: JjColors.textDim), + child: Center( + child: Icon(open ? Icons.expand_more : Icons.chevron_right, size: 18, color: JjColors.textDim)), )) : null, ); // 좁은 창 (폰 세로의 좌우 두 창) 에서 깊은 폴더: 들여쓰기는 이름 자리를 남기는 만큼만 (넘치지 않게) Widget nameCell() => LayoutBuilder(builder: (context, box) { - final fixed = (list ? 0 : 20) + (look.rich ? 64 : look.iconSize + 12) + 48.0; + final fixed = (list ? 0 : chevronWidth) + (look.rich ? 64 : look.iconSize + 12) + 48.0; final indent = list ? 0.0 : (row.depth * look.indent).clamp(0.0, (box.maxWidth - fixed).clamp(0.0, double.infinity)); return Row(children: [ SizedBox(width: indent), diff --git a/test/explorer_test.dart b/test/explorer_test.dart index cc64173..3666a8a 100644 --- a/test/explorer_test.dart +++ b/test/explorer_test.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -497,6 +498,24 @@ void main() { await tester.pump(); }); + testWidgets('189: Android 는 트리 화살표를 손가락으로 누를 수 있게 넓게 (줄 높이 전체 · 폭 44)', (tester) async { + debugDefaultTargetPlatformOverride = TargetPlatform.android; + addTearDown(() => debugDefaultTargetPlatformOverride = null); + await open(tester); + final area = find.ancestor(of: find.descendant( + of: find.ancestor(of: find.text('sub'), matching: find.byType(InkWell)).first, matching: find.byIcon(Icons.chevron_right)), + matching: find.byType(InkResponse)).first; + final size = tester.getSize(area); + expect(size.width, greaterThanOrEqualTo(44)); + expect(size.height, greaterThanOrEqualTo(34)); + // 아이콘이 아니라 누르는 영역의 가장자리를 눌러도 펼친다 + final r = tester.getRect(area); + await act(tester, () => tester.tapAt(Offset(r.left + 3, r.top + 3))); + await settle(tester, () => find.text('inner.txt').evaluate().isNotEmpty); + expect(find.text('inner.txt'), findsOneWidget); + debugDefaultTargetPlatformOverride = null; + }); + test('74: 패턴 (* · ? · 여러 개 · 대소문자 무시)', () { final re = globToRegExp('*.srt; ep??.mkv'); expect(['a.srt', 'A.SRT', 'ep01.mkv'].every(re.hasMatch), isTrue);