mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
Inner Gamer RGB theme with a speed slider; keep the colour picker's hex box in view above the keyboard
The hex box sat at the bottom of the picker, so with the keyboard up the dialog was cut off and the field could not be seen. While the box has focus the dialog now scrolls to its end, and again whenever the visible height changes, so the hex box and OK / Cancel stay above the keyboard. Inner Gamer is a new theme just above Gradient. Its accent walks round the colour wheel on a Compose infinite transition, so Android's animation clock drives it and it holds still when animations are off. The hue moves in 3 degree steps so the app restyles only when the colour visibly changes. Setup shows a Speed slider (1 to 10) while it is selected. The palette comes from ThemeColors.palette, so button text stays readable at every hue.
This commit is contained in:
1 parent
bf4aa58c68
commit
f7acb7fcd7
41 files changed
+263
-4
No files matched your search
@@ -764,6 +764,14 @@ object SessionPrefs {
|
||||
it.getInt("gradientSecondary", com.droiddeck.launcher.ui.Themes.DEFAULT_SECONDARY)
|
||||
}
|
||||
|
||||
/** How fast the Inner Gamer theme cycles its colours, 1 to 10. */
|
||||
fun rgbSpeed(context: Context): Int =
|
||||
prefs(context).getInt("innerGamerSpeed", com.droiddeck.launcher.ui.Themes.DEFAULT_RGB_SPEED).coerceIn(1, com.droiddeck.launcher.ui.Themes.RGB_SPEEDS)
|
||||
|
||||
fun setRgbSpeed(context: Context, speed: Int) {
|
||||
prefs(context).edit().putInt("innerGamerSpeed", speed.coerceIn(1, com.droiddeck.launcher.ui.Themes.RGB_SPEEDS)).apply()
|
||||
}
|
||||
|
||||
fun setGradientColors(context: Context, primary: Int, secondary: Int) {
|
||||
prefs(context).edit().putInt("gradientPrimary", primary).putInt("gradientSecondary", secondary).apply()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user