mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-14 17:55:58 -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
|
|
@ -1294,6 +1294,7 @@
|
||||||
"usePostersForLibraryIconsDesc": "Show posters instead of icons for libraries",
|
"usePostersForLibraryIconsDesc": "Show posters instead of icons for libraries",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"shortCuts": "Shortcuts",
|
"shortCuts": "Shortcuts",
|
||||||
|
"keyboardShortCuts": "Keyboard shortcuts",
|
||||||
"skipForwardLength": "Skip forward length",
|
"skipForwardLength": "Skip forward length",
|
||||||
"skipBackLength": "Skip back length",
|
"skipBackLength": "Skip back length",
|
||||||
"playPause": "Play/Pause",
|
"playPause": "Play/Pause",
|
||||||
|
|
|
||||||
|
|
@ -206,29 +206,36 @@ class _PlayerSettingsPageState extends ConsumerState<PlayerSettingsPage> {
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer)
|
if (AdaptiveLayout.inputDeviceOf(context) == InputDevice.pointer)
|
||||||
...VideoHotKeys.values.map(
|
ExpansionTile(
|
||||||
(entry) => Padding(
|
title: Text(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
context.localized.keyboardShortCuts,
|
||||||
child: Row(
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
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)),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
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),
|
const SizedBox(height: 12),
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,10 @@ class FladderTheme {
|
||||||
margin: EdgeInsets.zero,
|
margin: EdgeInsets.zero,
|
||||||
shape: smallShape,
|
shape: smallShape,
|
||||||
),
|
),
|
||||||
|
expansionTileTheme: ExpansionTileThemeData(
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: FladderTheme.defaultShape.borderRadius),
|
||||||
|
collapsedShape: RoundedRectangleBorder(borderRadius: FladderTheme.defaultShape.borderRadius),
|
||||||
|
),
|
||||||
progressIndicatorTheme: const ProgressIndicatorThemeData(),
|
progressIndicatorTheme: const ProgressIndicatorThemeData(),
|
||||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||||
backgroundColor: scheme?.secondaryContainer,
|
backgroundColor: scheme?.secondaryContainer,
|
||||||
|
|
@ -62,7 +66,7 @@ class FladderTheme {
|
||||||
snackBarTheme: SnackBarThemeData(
|
snackBarTheme: SnackBarThemeData(
|
||||||
backgroundColor: scheme?.secondary,
|
backgroundColor: scheme?.secondary,
|
||||||
behavior: SnackBarBehavior.fixed,
|
behavior: SnackBarBehavior.fixed,
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
shape: RoundedRectangleBorder(borderRadius: FladderTheme.defaultShape.borderRadius),
|
||||||
elevation: 5,
|
elevation: 5,
|
||||||
dismissDirection: DismissDirection.horizontal,
|
dismissDirection: DismissDirection.horizontal,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue