mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-01 05:39:34 +02:00
style(lyrics): use compact liquid glass language menu
This commit is contained in:
1 parent
8103c313d7
commit
8b85f65874
4 files changed
+61
-16
No files matched your search
@@ -1802,13 +1802,30 @@ class _NowPlayingScreenState extends ConsumerState<NowPlayingScreen> {
|
||||
setState(() => _lyricsOptionsOpen = true);
|
||||
try {
|
||||
final anchor = mornyeMenuAnchor(buttonContext);
|
||||
var menuWidth = 240.0;
|
||||
for (final (_, label, _) in actions) {
|
||||
final painter = TextPainter(
|
||||
text: TextSpan(
|
||||
text: label,
|
||||
style: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyLarge?.copyWith(fontSize: 15),
|
||||
),
|
||||
textDirection: Directionality.of(context),
|
||||
textScaler: MediaQuery.textScalerOf(context),
|
||||
)..layout();
|
||||
if (painter.width + 80 > menuWidth) menuWidth = painter.width + 80;
|
||||
painter.dispose();
|
||||
}
|
||||
final action = context.isMornye
|
||||
? await showMornyeContextMenu<String>(
|
||||
context: buttonContext,
|
||||
anchor: anchor,
|
||||
preferAbove: true,
|
||||
maxWidth: menuWidth,
|
||||
builder: (menuContext) => MornyeContextMenu(
|
||||
dense: true,
|
||||
liquidGlass: true,
|
||||
groups: [
|
||||
[
|
||||
for (final (value, label, icon) in actions)
|
||||
|
||||
Reference in new issue
Block a user