fix(library): spread filters across the search field width

This commit is contained in:
zarzet committed 2026-10-01 00:16:38 +07:00
1 parent cef57af562
commit fa491356d8
1 file changed
+49 -41
+49 -41
View File
@@ -1582,8 +1582,8 @@ class _QueueTabState extends ConsumerState<QueueTab> {
SliverToBoxAdapter( SliverToBoxAdapter(
child: Padding( child: Padding(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 4), padding: const EdgeInsets.fromLTRB(16, 12, 16, 4),
child: Builder( child: LayoutBuilder(
builder: (context) { builder: (context, constraints) {
int filteredAllCount; int filteredAllCount;
int filteredAlbumCount; int filteredAlbumCount;
int filteredSingleCount; int filteredSingleCount;
@@ -1600,45 +1600,53 @@ class _QueueTabState extends ConsumerState<QueueTab> {
padding: context.isMornye padding: context.isMornye
? const EdgeInsets.symmetric(vertical: 4) ? const EdgeInsets.symmetric(vertical: 4)
: EdgeInsets.zero, : EdgeInsets.zero,
child: Row( child: ConstrainedBox(
children: [ constraints: BoxConstraints(
_FilterChip( minWidth: constraints.maxWidth,
label: context.l10n.historyFilterAll, ),
count: filteredAllCount, child: Row(
isSelected: historyFilterMode == 'all', mainAxisAlignment:
onTap: () { MainAxisAlignment.spaceBetween,
_animateToFilterPage(0); children: [
}, _FilterChip(
), label: context.l10n.historyFilterAll,
const SizedBox(width: 8), count: filteredAllCount,
_FilterChip( isSelected: historyFilterMode == 'all',
label: context.l10n.historyFilterAlbums, onTap: () {
count: filteredAlbumCount, _animateToFilterPage(0);
isSelected: historyFilterMode == 'albums', },
onTap: () { ),
_animateToFilterPage(1); const SizedBox(width: 8),
}, _FilterChip(
), label: context.l10n.historyFilterAlbums,
const SizedBox(width: 8), count: filteredAlbumCount,
_FilterChip( isSelected: historyFilterMode == 'albums',
label: context.l10n.historyFilterSingles, onTap: () {
count: filteredSingleCount, _animateToFilterPage(1);
isSelected: historyFilterMode == 'singles', },
onTap: () { ),
_animateToFilterPage(2); const SizedBox(width: 8),
}, _FilterChip(
), label: context.l10n.historyFilterSingles,
const SizedBox(width: 8), count: filteredSingleCount,
_FilterChip( isSelected:
label: context.l10n.searchPlaylists, historyFilterMode == 'singles',
count: collectionState.playlists.length, onTap: () {
isSelected: _animateToFilterPage(2);
historyFilterMode == 'playlists', },
onTap: () { ),
_animateToFilterPage(3); const SizedBox(width: 8),
}, _FilterChip(
), label: context.l10n.searchPlaylists,
], count: collectionState.playlists.length,
isSelected:
historyFilterMode == 'playlists',
onTap: () {
_animateToFilterPage(3);
},
),
],
),
), ),
), ),
); );