Add layout tooltips

This commit is contained in:
Elias Bonnici 2024-06-13 10:35:29 +02:00
parent 909c3d00bb
commit ba4a8296af
No known key found for this signature in database
GPG Key ID: 5EAC28EA3F980CCF
6 changed files with 41 additions and 13 deletions

View File

@ -121,6 +121,11 @@
"s_light_mode": "Heller Modus",
"s_dark_mode": "Dunkler Modus",
"@_layout": {},
"s_list_layout": null,
"s_grid_layout": null,
"s_mixed_layout": null,
"@_yubikey_selection": {},
"s_select_to_scan": "Zum Scannen auswählen",
"s_hide_device": "Gerät verstecken",

View File

@ -121,6 +121,11 @@
"s_light_mode": "Light mode",
"s_dark_mode": "Dark mode",
"@_layout": {},
"s_list_layout": "List layout",
"s_grid_layout": "Grid layout",
"s_mixed_layout": "Mixed layout",
"@_yubikey_selection": {},
"s_select_to_scan": "Select to scan",
"s_hide_device": "Hide device",

View File

@ -121,6 +121,11 @@
"s_light_mode": "Thème clair",
"s_dark_mode": "Thème sombre",
"@_layout": {},
"s_list_layout": null,
"s_grid_layout": null,
"s_mixed_layout": null,
"@_yubikey_selection": {},
"s_select_to_scan": "Sélectionner pour scanner",
"s_hide_device": "Masquer appareil",

View File

@ -121,6 +121,11 @@
"s_light_mode": "ライトモード",
"s_dark_mode": "ダークモード",
"@_layout": {},
"s_list_layout": null,
"s_grid_layout": null,
"s_mixed_layout": null,
"@_yubikey_selection": {},
"s_select_to_scan": "選択してスキャン",
"s_hide_device": "デバイスを非表示",

View File

@ -121,6 +121,11 @@
"s_light_mode": "Jasny",
"s_dark_mode": "Ciemny",
"@_layout": {},
"s_list_layout": null,
"s_grid_layout": null,
"s_mixed_layout": null,
"@_yubikey_selection": {},
"s_select_to_scan": "Wybierz, aby skanować",
"s_hide_device": "Ukryj urządzenie",

View File

@ -464,6 +464,7 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
});
},
child: IconButton(
tooltip: l10n.s_list_layout,
onPressed: () {
ref
.read(pinnedLayoutProvider.notifier)
@ -494,20 +495,19 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
});
},
child: IconButton(
tooltip: l10n.s_grid_layout,
onPressed: () {
ref
.read(pinnedLayoutProvider.notifier)
.setLayout(FlexLayout.grid);
ref
.read(layoutProvider.notifier)
.setLayout(FlexLayout.list);
.setLayout(FlexLayout.grid);
},
icon: Icon(
Symbols.vertical_split,
color: mixedView
? Theme.of(context).colorScheme.primary
: null,
),
icon: Icon(Symbols.grid_view,
color: gridView
? Theme.of(context).colorScheme.primary
: null),
),
),
MouseRegion(
@ -524,20 +524,23 @@ class _UnlockedViewState extends ConsumerState<_UnlockedView> {
});
},
child: IconButton(
tooltip: l10n.s_mixed_layout,
onPressed: () {
ref
.read(pinnedLayoutProvider.notifier)
.setLayout(FlexLayout.grid);
ref
.read(layoutProvider.notifier)
.setLayout(FlexLayout.grid);
.setLayout(FlexLayout.list);
},
icon: Icon(Symbols.grid_view,
color: gridView
? Theme.of(context).colorScheme.primary
: null),
icon: Icon(
Symbols.vertical_split,
color: mixedView
? Theme.of(context).colorScheme.primary
: null,
),
),
)
),
]
],
),