mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
chore: settings popup menu constraints
This commit is contained in:
parent
082f711018
commit
768bab8bbb
@ -23,6 +23,9 @@ class AdaptiveSelectTile<T> extends HookWidget {
|
|||||||
|
|
||||||
final bool? breakLayout;
|
final bool? breakLayout;
|
||||||
|
|
||||||
|
final BoxConstraints? popupConstraints;
|
||||||
|
final PopoverConstraint? popupWidthConstraint;
|
||||||
|
|
||||||
const AdaptiveSelectTile({
|
const AdaptiveSelectTile({
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.value,
|
required this.value,
|
||||||
@ -34,6 +37,8 @@ class AdaptiveSelectTile<T> extends HookWidget {
|
|||||||
this.breakLayout,
|
this.breakLayout,
|
||||||
this.showValueWhenUnfolded = true,
|
this.showValueWhenUnfolded = true,
|
||||||
super.key,
|
super.key,
|
||||||
|
this.popupConstraints,
|
||||||
|
this.popupWidthConstraint,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -47,6 +52,8 @@ class AdaptiveSelectTile<T> extends HookWidget {
|
|||||||
},
|
},
|
||||||
value: value,
|
value: value,
|
||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
|
popupConstraints: popupConstraints ?? const BoxConstraints(maxWidth: 200),
|
||||||
|
popupWidthConstraint: popupWidthConstraint ?? PopoverConstraint.flexible,
|
||||||
children: options,
|
children: options,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -281,6 +281,7 @@ class SettingsPlaybackSection extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
if (preferences.audioSource != AudioSource.jiosaavn) ...[
|
if (preferences.audioSource != AudioSource.jiosaavn) ...[
|
||||||
AdaptiveSelectTile<SourceCodecs>(
|
AdaptiveSelectTile<SourceCodecs>(
|
||||||
|
popupConstraints: const BoxConstraints(maxWidth: 300),
|
||||||
secondary: const Icon(SpotubeIcons.stream),
|
secondary: const Icon(SpotubeIcons.stream),
|
||||||
title: Text(context.l10n.streaming_music_codec),
|
title: Text(context.l10n.streaming_music_codec),
|
||||||
value: preferences.streamMusicCodec,
|
value: preferences.streamMusicCodec,
|
||||||
@ -300,6 +301,7 @@ class SettingsPlaybackSection extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
AdaptiveSelectTile<SourceCodecs>(
|
AdaptiveSelectTile<SourceCodecs>(
|
||||||
|
popupConstraints: const BoxConstraints(maxWidth: 300),
|
||||||
secondary: const Icon(SpotubeIcons.file),
|
secondary: const Icon(SpotubeIcons.file),
|
||||||
title: Text(context.l10n.download_music_codec),
|
title: Text(context.l10n.download_music_codec),
|
||||||
value: preferences.downloadMusicCodec,
|
value: preferences.downloadMusicCodec,
|
||||||
|
Loading…
Reference in New Issue
Block a user