fix(flutter): mini player heart/kebab span title+artist height
Move the like + kebab buttons out of the title row and place them as siblings to the title/artist column. Row's default crossAxisAlignment centers them against the row's full 48dp height (set by the album art), so visually they sit at the vertical center of the title+artist block instead of being pinned to the title baseline. Width stays 32dp each — horizontal footprint matches what we had. Bumped icon size 18→20 since they have more vertical space to occupy.
This commit is contained in:
@@ -89,6 +89,9 @@ class _TrackInfo extends StatelessWidget {
|
|||||||
final artistName = (media.artist ?? '').trim();
|
final artistName = (media.artist ?? '').trim();
|
||||||
|
|
||||||
return Row(
|
return Row(
|
||||||
|
// Default centering vertically aligns the like/kebab buttons
|
||||||
|
// against the album art (48dp) — visually they span the title +
|
||||||
|
// artist block instead of sitting on the title baseline.
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (media.artUri != null)
|
if (media.artUri != null)
|
||||||
@@ -115,39 +118,11 @@ class _TrackInfo extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
// Title row: title text + inline like + kebab. The
|
Text(
|
||||||
// like/kebab buttons get their default 48dp tap target
|
media.title,
|
||||||
// shrunk to 32dp so the title has room.
|
maxLines: 1,
|
||||||
Row(
|
overflow: TextOverflow.ellipsis,
|
||||||
mainAxisSize: MainAxisSize.max,
|
style: TextStyle(color: fs.parchment, fontSize: 14),
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
media.title,
|
|
||||||
maxLines: 1,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: TextStyle(color: fs.parchment, fontSize: 14),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
child: LikeButton(
|
|
||||||
kind: LikeKind.track,
|
|
||||||
id: media.id,
|
|
||||||
size: 18,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 32,
|
|
||||||
height: 32,
|
|
||||||
child: TrackActionsButton(
|
|
||||||
track: _trackRefFromMediaItem(media),
|
|
||||||
hideQueueActions: true,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
if (artistName.isNotEmpty)
|
if (artistName.isNotEmpty)
|
||||||
Text(
|
Text(
|
||||||
@@ -159,6 +134,28 @@ class _TrackInfo extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// Like + kebab as siblings to the title/artist column rather
|
||||||
|
// than nested inside the title row. Width stays 32dp each so
|
||||||
|
// horizontal footprint matches what we had; height stretches
|
||||||
|
// to the row's full 48dp so the icons sit at vertical center
|
||||||
|
// against the title+artist block.
|
||||||
|
SizedBox(
|
||||||
|
width: 32,
|
||||||
|
height: 48,
|
||||||
|
child: LikeButton(
|
||||||
|
kind: LikeKind.track,
|
||||||
|
id: media.id,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 32,
|
||||||
|
height: 48,
|
||||||
|
child: TrackActionsButton(
|
||||||
|
track: _trackRefFromMediaItem(media),
|
||||||
|
hideQueueActions: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user