feat(mobile): improve owner name display in thumbnail tile

This commit is contained in:
idubnori
2025-12-14 22:03:25 +09:00
parent f13a5ba418
commit 9262f69519

View File

@@ -53,7 +53,9 @@ class ThumbnailTile extends ConsumerWidget {
return Stack(
children: [
Container(color: lockSelection ? context.colorScheme.surfaceContainerHighest : assetContainerColor),
AnimatedContainer(
LayoutBuilder(
builder: (context, constraints) {
return AnimatedContainer(
duration: Durations.short4,
curve: Curves.decelerate,
padding: EdgeInsets.all(isSelected || lockSelection ? 6 : 0),
@@ -81,7 +83,11 @@ class ThumbnailTile extends ConsumerWidget {
Align(
alignment: Alignment.bottomRight,
child: Padding(
padding: const EdgeInsets.only(right: 10.0, bottom: 6.0),
padding: EdgeInsets.only(
right: constraints.maxWidth * 0.03,
left: constraints.maxWidth * 0.3,
bottom: constraints.maxWidth * 0.01,
),
child: _OwnerNameLabel(ownerName: ownerName!),
),
),
@@ -120,6 +126,8 @@ class ThumbnailTile extends ConsumerWidget {
],
),
),
);
},
),
TweenAnimationBuilder<double>(
tween: Tween<double>(begin: 0.0, end: (isSelected || lockSelection) ? 1.0 : 0.0),
@@ -260,7 +268,8 @@ class _OwnerNameLabel extends StatelessWidget {
fontWeight: FontWeight.w600,
shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))],
),
overflow: TextOverflow.ellipsis,
overflow: TextOverflow.fade,
softWrap: false,
maxLines: 1,
),
);