Merge commit '565ad3b' into next
commit
160bfe85e0
|
|
@ -5314,17 +5314,11 @@ class _ExplorerPageState extends State<ExplorerPage> {
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(name, maxLines: 1, overflow: TextOverflow.ellipsis, style: nameStyle),
|
||||
Row(children: [
|
||||
// 좁은 화면 · 깊은 폴더에서 넘치지 않게
|
||||
Flexible(
|
||||
child: 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)),
|
||||
],
|
||||
]),
|
||||
// 좁은 화면 · 깊은 폴더에서 넘치지 않게. 960 캡처 (10/18): 동영상 정보와 한 줄 글로 (둘로 나누면 정보가 비어도
|
||||
// 폭의 반을 차지해 넓은 창에서도 날짜가 잘렸다)
|
||||
isVideoFile(e.path)
|
||||
? _MetaText(c: c, path: e.path, lead: '${formatSize(e.size)} · ${_date(e.modified)}', leadStyle: dim)
|
||||
: Text('${formatSize(e.size)} · ${_date(e.modified)}', style: dim, maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
|
|
@ -5742,13 +5736,22 @@ class _Meta {
|
|||
class _MetaText extends StatelessWidget {
|
||||
final AppController c;
|
||||
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
|
||||
Widget build(BuildContext context) => FutureBuilder<String>(
|
||||
future: _Meta.of(c, path),
|
||||
builder: (_, s) => Text(s.data ?? '',
|
||||
maxLines: 1, overflow: TextOverflow.ellipsis, style: const TextStyle(fontSize: 11, color: JjColors.accent)),
|
||||
builder: (_, s) => Text.rich(
|
||||
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),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue