mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
Backdrop improvements (#476)
## Description The backdrop image shown on most pages is now configurable in advanced settings: * Image w/ dynamic color - Shows the backdrop with dynamic color filling the entire space (new default) * Image only - Shows only the backdrop image (current Wholphin behavior) * None - Don't show any backdrops Additionally, the backdrop is retained between page loads for the same items. ## Acknowledgements Big thanks to @YogiBear12 from which the idea and implementation for the dynamic color was adapted from! Code adapted from https://github.com/YogiBear12/Halfin/blob/main/COLOR_EXTRACTION_AND_BACKDROP.md#backdrop-fading-and-transitions ## Issues Closes #221 Closes #461 Closes #442 https://github.com/user-attachments/assets/1acbc487-c697-44d7-89ed-e7e4c9169360
This commit is contained in:
parent
8224f83678
commit
bbfbc13532
26 changed files with 569 additions and 224 deletions
|
|
@ -659,6 +659,19 @@ sealed interface AppPreference<Pref, T> {
|
|||
summaryOff = R.string.disabled,
|
||||
)
|
||||
|
||||
val BackdropStylePref =
|
||||
AppChoicePreference<AppPreferences, BackdropStyle>(
|
||||
title = R.string.backdrop_display,
|
||||
defaultValue = BackdropStyle.BACKDROP_DYNAMIC_COLOR,
|
||||
getter = { it.interfacePreferences.backdropStyle },
|
||||
setter = { prefs, value ->
|
||||
prefs.updateInterfacePreferences { backdropStyle = value }
|
||||
},
|
||||
displayValues = R.array.backdrop_style_options,
|
||||
indexToValue = { BackdropStyle.forNumber(it) },
|
||||
valueToIndex = { it.number },
|
||||
)
|
||||
|
||||
val OneClickPause =
|
||||
AppSwitchPreference<AppPreferences>(
|
||||
title = R.string.one_click_pause,
|
||||
|
|
@ -909,6 +922,7 @@ val advancedPreferences =
|
|||
// Temporarily disabled, see https://github.com/damontecres/Wholphin/pull/127#issuecomment-3478058418
|
||||
// AppPreference.NavDrawerSwitchOnFocus,
|
||||
AppPreference.ControllerTimeout,
|
||||
AppPreference.BackdropStylePref,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ class AppPreferencesSerializer
|
|||
navDrawerSwitchOnFocus =
|
||||
AppPreference.NavDrawerSwitchOnFocus.defaultValue
|
||||
showClock = AppPreference.ShowClock.defaultValue
|
||||
backdropStyle = AppPreference.BackdropStylePref.defaultValue
|
||||
|
||||
subtitlesPreferences =
|
||||
SubtitlePreferences
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue