mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
feat: make shortcuts list collapsible (#482)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
a711e133a4
commit
9c31542c95
3 changed files with 35 additions and 23 deletions
|
|
@ -206,29 +206,36 @@ class _PlayerSettingsPageState extends ConsumerState<PlayerSettingsPage> {
|
|||
)),
|
||||
),
|
||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer)
|
||||
...VideoHotKeys.values.map(
|
||||
(entry) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
entry.label(context),
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: KeyCombinationWidget(
|
||||
currentKey: videoSettings.hotKeys[entry],
|
||||
defaultKey: videoSettings.defaultShortCuts[entry]!,
|
||||
onChanged: (value) =>
|
||||
ref.read(videoPlayerSettingsProvider.notifier).setShortcuts(MapEntry(entry, value)),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
ExpansionTile(
|
||||
title: Text(
|
||||
context.localized.keyboardShortCuts,
|
||||
style: Theme.of(context).textTheme.titleLarge,
|
||||
),
|
||||
)
|
||||
children: VideoHotKeys.values.map(
|
||||
(entry) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
entry.label(context),
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: KeyCombinationWidget(
|
||||
currentKey: videoSettings.hotKeys[entry],
|
||||
defaultKey: videoSettings.defaultShortCuts[entry]!,
|
||||
onChanged: (value) => ref
|
||||
.read(videoPlayerSettingsProvider.notifier)
|
||||
.setShortcuts(MapEntry(entry, value)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue