mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-25 21:40:57 +02:00
fix(queue): prevent header row overflow on narrow screens
The track/album count header rows sized their text and action buttons at natural width; on narrow layouts (or long localized labels) the row overflowed by a few pixels. The count text and the create-playlist button label now flex and ellipsize instead.
This commit is contained in:
@@ -209,22 +209,32 @@ extension _QueueTabFilterWidgets on _QueueTabState {
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
context.l10n.queueTrackCount(totalTrackCount),
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
Flexible(
|
||||
child: Text(
|
||||
context.l10n.queueTrackCount(totalTrackCount),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
if (!_isSelectionMode)
|
||||
_buildFilterButton(context, unifiedItems),
|
||||
if (!_isSelectionMode && filteredUnifiedItems.isNotEmpty)
|
||||
TextButton.icon(
|
||||
onPressed: () => _showCreatePlaylistDialog(context),
|
||||
icon: const Icon(Icons.add, size: 20),
|
||||
label: Text(context.l10n.collectionCreatePlaylist),
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity.compact,
|
||||
Flexible(
|
||||
child: TextButton.icon(
|
||||
onPressed: () => _showCreatePlaylistDialog(context),
|
||||
icon: const Icon(Icons.add, size: 20),
|
||||
label: Text(
|
||||
context.l10n.collectionCreatePlaylist,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -240,10 +250,14 @@ extension _QueueTabFilterWidgets on _QueueTabState {
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
context.l10n.queueAlbumCount(totalAlbumCount),
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
Flexible(
|
||||
child: Text(
|
||||
context.l10n.queueAlbumCount(totalAlbumCount),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
@@ -518,22 +532,32 @@ extension _QueueTabFilterWidgets on _QueueTabState {
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
context.l10n.queueTrackCount(totalTrackCount),
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
Flexible(
|
||||
child: Text(
|
||||
context.l10n.queueTrackCount(totalTrackCount),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
if (!_isSelectionMode)
|
||||
_buildFilterButton(context, unifiedItems),
|
||||
if (!_isSelectionMode && filteredUnifiedItems.isNotEmpty)
|
||||
TextButton.icon(
|
||||
onPressed: () => _showCreatePlaylistDialog(context),
|
||||
icon: const Icon(Icons.add, size: 20),
|
||||
label: Text(context.l10n.collectionCreatePlaylist),
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity.compact,
|
||||
Flexible(
|
||||
child: TextButton.icon(
|
||||
onPressed: () => _showCreatePlaylistDialog(context),
|
||||
icon: const Icon(Icons.add, size: 20),
|
||||
label: Text(
|
||||
context.l10n.collectionCreatePlaylist,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity.compact,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user