WIP 960 캡처: 탐색기 동영상 줄의 "크기 · 날짜" 가 넓은 창에서도 잘리던 것 - 동영상 정보와 한 줄 글로 (검토 대기)

관리자 지시 (10/18, next e8baa84 의 960 폭 캡처에서 찾음): X-plore 모양 트리의 동영상 줄이 "5KB · 2026-10-18 03:…" 로 잘렸다.
크기 · 날짜 글과 동영상 정보 (_MetaText) 가 Flexible 둘이라 폭을 반씩 나눴고, 정보가 비어 있어도 반을 차지했다.
→ _MetaText 가 앞글 (크기 · 날짜) 과 정보를 한 Text.rich 로 그린다 (넘치면 끝을 줄임). 동영상이 아닌 줄은 그대로.

확인: windows_xplore 캡처 (release\test\shots_trunc\windows_xplore_meta - 960 에서 "5KB · 2026-10-18 04:13" 다 보임) 4 통과, explorer_test 56 통과, analyze 문제 없음.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trunc_fix
RyuJongJin 2026-10-18 04:22:08 +09:00
parent 53a74183a7
commit 565ad3bd17
1 changed files with 17 additions and 14 deletions

View File

@ -5120,17 +5120,11 @@ class _ExplorerPageState extends State<ExplorerPage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text(name, maxLines: 1, overflow: TextOverflow.ellipsis, style: nameStyle), Text(name, maxLines: 1, overflow: TextOverflow.ellipsis, style: nameStyle),
Row(children: [ // 좁은 화면 · 깊은 폴더에서 넘치지 않게. 960 캡처 (10/18): 동영상 정보와 한 줄 글로 (둘로 나누면 정보가 비어도
// 좁은 화면 · 깊은 폴더에서 넘치지 않게 // 폭의 반을 차지해 넓은 창에서도 날짜가 잘렸다)
Flexible( isVideoFile(e.path)
child: Text('${formatSize(e.size)} · ${_date(e.modified)}', ? _MetaText(c: c, path: e.path, lead: '${formatSize(e.size)} · ${_date(e.modified)}', leadStyle: dim)
style: dim, maxLines: 1, overflow: TextOverflow.ellipsis), : Text('${formatSize(e.size)} · ${_date(e.modified)}', style: dim, maxLines: 1, overflow: TextOverflow.ellipsis),
),
if (isVideoFile(e.path)) ...[
const SizedBox(width: 8),
Flexible(child: _MetaText(c: c, path: e.path)),
],
]),
], ],
) )
: Column( : Column(
@ -5546,13 +5540,22 @@ class _Meta {
class _MetaText extends StatelessWidget { class _MetaText extends StatelessWidget {
final AppController c; final AppController c;
final String path; final String path;
const _MetaText({required this.c, required this.path});
/// 앞에 붙일 글 (크기 · 날짜) - 동영상 정보와 한 줄로 이어 그린다
final String lead;
final TextStyle? leadStyle;
const _MetaText({required this.c, required this.path, this.lead = '', this.leadStyle});
@override @override
Widget build(BuildContext context) => FutureBuilder<String>( Widget build(BuildContext context) => FutureBuilder<String>(
future: _Meta.of(c, path), future: _Meta.of(c, path),
builder: (_, s) => Text(s.data ?? '', builder: (_, s) => Text.rich(
maxLines: 1, overflow: TextOverflow.ellipsis, style: const TextStyle(fontSize: 11, color: JjColors.accent)), TextSpan(children: [
if (lead.isNotEmpty) TextSpan(text: lead, style: leadStyle),
if ((s.data ?? '').isNotEmpty) TextSpan(text: '${lead.isEmpty ? '' : ' '}${s.data}', style: const TextStyle(fontSize: 11, color: JjColors.accent)),
]),
maxLines: 1,
overflow: TextOverflow.ellipsis),
); );
} }