From 8bfcb7ceda0f2efd5f44798045cc9da1e731f991 Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Mon, 12 Oct 2026 01:43:11 +0900 Subject: [PATCH] =?UTF-8?q?MKV=20=EC=9C=84=20=EB=A7=89=EB=8C=80:=20?= =?UTF-8?q?=EC=96=B4=EB=A6=BC=EC=9C=BC=EB=A1=9C=20=EB=91=90=20=EC=A4=84?= =?UTF-8?q?=EC=9D=84=20=EC=A0=95=ED=95=98=EB=8D=98=20=EA=B2=83=EC=9D=84=20?= =?UTF-8?q?=EB=B9=BC=EA=B3=A0=20=EC=8B=A4=EC=A0=9C=EB=A1=9C=20=EC=9E=B0=20?= =?UTF-8?q?=EA=B2=83=EB=A7=8C=20(242=20=EB=B3=B4=EC=B6=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 버그: 900 에서 한 줄에 들어가는데 어림이 두 줄로 바꿨다 (scale_menu_test) Co-Authored-By: Claude Opus 5.5 --- lib/ui/app_actions.dart | 7 ++----- lib/ui/home_page.dart | 36 ++++++++++-------------------------- 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/lib/ui/app_actions.dart b/lib/ui/app_actions.dart index d48595f..2875d13 100644 --- a/lib/ui/app_actions.dart +++ b/lib/ui/app_actions.dart @@ -27,7 +27,6 @@ bool isCompact(BuildContext context) => MediaQuery.sizeOf(context).width < compa /// 좁은 화면에서는 두 줄 - 위: [nav] … [actions], 아래: [middle] 이 한 줄을 다 쓴다. /// [minMiddleWidth] (201): 한 줄일 때 middle 이 이보다 좁아지면 (폰 가로처럼 넓지만 버튼이 폭을 다 차지할 때) 두 줄로. /// 브라우저 주소 칸처럼 middle 이 꼭 보여야 하는 화면이 준다 (0 이면 폭만으로 정함). -/// [twoRows] (242): 화면이 직접 잰 결과 한 줄에 다 들어가지 않으면 두 줄로 (MKV 화면 - 작업 중 버튼이 늘 때). /// [trailing] (242): middle 오른쪽에 붙는, 줄지 않는 버튼 묶음 - 이것 때문에 middle 이 [minMiddleWidth] 보다 좁아지면 두 줄 /// (어림한 폭이 실제보다 작아 넘친 버튼이 화면 크기 "100%" 를 덮던 것 - 실제로 재어 정한다) class AppTopBar extends StatefulWidget { @@ -36,15 +35,13 @@ class AppTopBar extends StatefulWidget { final Widget? trailing; final Widget actions; final double minMiddleWidth; - final bool twoRows; const AppTopBar( {super.key, required this.nav, required this.middle, this.trailing, required this.actions, - this.minMiddleWidth = 0, - this.twoRows = false}); + this.minMiddleWidth = 0}); @override State createState() => _AppTopBarState(); @@ -68,7 +65,7 @@ class _AppTopBarState extends State { final nav = widget.nav, middle = widget.middle, actions = widget.actions; final width = MediaQuery.sizeOf(context).width; final narrow = _twoRowsAtOrBelow != null && width <= _twoRowsAtOrBelow!; - if (!isCompact(context) && !narrow && !widget.twoRows) { + if (!isCompact(context) && !narrow) { if (widget.minMiddleWidth > 0) WidgetsBinding.instance.addPostFrameCallback((_) => _check(width)); return Container( height: appBarHeight, diff --git a/lib/ui/home_page.dart b/lib/ui/home_page.dart index 7526ea6..03d5989 100644 --- a/lib/ui/home_page.dart +++ b/lib/ui/home_page.dart @@ -278,10 +278,8 @@ class _TopBar extends StatelessWidget { final count = c.checked.isEmpty ? '' : ' (${c.checked.length})'; // 창 너비에 맞춰 차례로 줄인다: 제목 글 → 왼쪽 버튼을 아이콘만 → 재생 · 브라우저를 아이콘만 → CPU · MEM 숨김. // (오른쪽의 화면 크기 · 환경 설정 · 종료 버튼은 어떤 너비에서도 밀려나지 않게) - final compactScreen = isCompact(context); + final compact = isCompact(context); return LayoutBuilder(builder: (context, box) { - // 242: 한 줄에 안 들어가면 이 그리기에서만 두 줄 (좁은 화면) 처럼 잰다 - var compact = compactScreen; final hasAi = c.aiAvailable; final hasPlayer = c.services.createMediaPlayer != null; var title = true, leftText = true, rightText = true, usage = c.usage != null, jobText = true; @@ -309,28 +307,15 @@ class _TopBar extends StatelessWidget { (c.checked.isEmpty ? 0 : 3 * 26) + 8; // 여유 final w = box.maxWidth; - void shrink() { - title = leftText = rightText = jobText = dlBox = mkvText = true; - usage = c.usage != null; - dlBox = downloads != null; - if (compact) title = false; - if (need() > w) title = false; - if (need() > w) jobText = false; - if (need() > w) leftText = false; - if (need() > w) rightText = false; - if (need() > w) usage = false; - if (need() > w) dlBox = false; - if (need() > w) mkvText = false; - } - - shrink(); - // 242: 다 줄여도 한 줄에 안 들어가면 (폰 가로에서 작업 중 - 진행 표시 · 취소가 늘 때) 두 줄로 다시 잰다. - // 예전에는 넘친 버튼 (결과 폴더) 이 오른쪽의 화면 크기 "100%" 를 덮었다 - final twoRows = !compact && need() > w; - if (twoRows) { - compact = true; - shrink(); - } + if (compact) title = false; + if (need() > w) title = false; + if (need() > w) jobText = false; + if (need() > w) leftText = false; + if (need() > w) rightText = false; + if (need() > w) usage = false; + if (need() > w) dlBox = false; + if (need() > w) mkvText = false; + // 242: 다 줄여도 모자라는지는 어림 (need) 이 아니라 위 막대가 실제로 잰다 (오른쪽 묶음 [trailing] · minMiddleWidth) // 7: 폰에는 "탐색기에서 끌어다 놓기" 가 없다 final addTip = Platform.isAndroid ? tr('동영상 추가') : tr('동영상 추가 (탐색기에서 끌어다 놓아도 됩니다)'); @@ -377,7 +362,6 @@ class _TopBar extends StatelessWidget { VoidCallback? build0() => !canBuild ? null : (batch.isEmpty ? () => _confirmBuildAll(context) : () => c.buildVideos(batch)); return AppTopBar( - twoRows: twoRows, // 242: 넓은 화면인데 한 줄에 안 들어갈 때도 이 두 줄 배치 nav: const AppNavButtons(onMkvPage: true), actions: AppActions(c: c, onExit: onExit, showUsage: false), middle: SingleChildScrollView(