feat(YouTube - Settings): Add a color picker (#4981)

Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
This commit is contained in:
MarcaD
2025-05-26 10:08:45 +03:00
committed by GitHub
parent 34932dc439
commit 1e0e398574
28 changed files with 1199 additions and 130 deletions

View File

@ -48,7 +48,9 @@ private val swipeControlsResourcePatch = resourcePatch {
summaryKey = null,
),
TextPreference("revanced_swipe_overlay_background_opacity", inputType = InputType.NUMBER),
TextPreference("revanced_swipe_overlay_progress_color", inputType = InputType.TEXT_CAP_CHARACTERS),
TextPreference("revanced_swipe_overlay_progress_color",
tag = "app.revanced.extension.shared.settings.preference.ColorPickerPreference",
inputType = InputType.TEXT_CAP_CHARACTERS),
TextPreference("revanced_swipe_text_overlay_size", inputType = InputType.NUMBER),
TextPreference("revanced_swipe_overlay_timeout", inputType = InputType.NUMBER),
TextPreference("revanced_swipe_threshold", inputType = InputType.NUMBER),

View File

@ -89,14 +89,15 @@ val themePatch = bytecodePatch(
execute {
val preferences = mutableSetOf<BasePreference>(
SwitchPreference("revanced_seekbar_custom_color"),
TextPreference("revanced_seekbar_custom_color_primary", inputType = InputType.TEXT_CAP_CHARACTERS),
TextPreference("revanced_seekbar_custom_color_primary",
tag = "app.revanced.extension.shared.settings.preference.ColorPickerPreference",
inputType = InputType.TEXT_CAP_CHARACTERS),
)
if (is_19_25_or_greater) {
preferences += TextPreference(
"revanced_seekbar_custom_color_accent",
inputType = InputType.TEXT_CAP_CHARACTERS
)
preferences += TextPreference("revanced_seekbar_custom_color_accent",
tag = "app.revanced.extension.shared.settings.preference.ColorPickerPreference",
inputType = InputType.TEXT_CAP_CHARACTERS)
}
PreferenceScreen.SEEKBAR.addPreferences(

View File

@ -74,6 +74,7 @@ private val settingsResourcePatch = resourcePatch {
arrayOf(
ResourceGroup("drawable",
"revanced_settings_circle_background.xml",
"revanced_settings_cursor.xml",
"revanced_settings_icon.xml",
"revanced_settings_screen_00_about.xml",
@ -91,6 +92,8 @@ private val settingsResourcePatch = resourcePatch {
"revanced_settings_screen_12_video.xml",
),
ResourceGroup("layout",
"revanced_color_dot_widget.xml",
"revanced_color_picker.xml",
"revanced_preference_with_icon_no_search_result.xml",
"revanced_search_suggestion_item.xml",
"revanced_settings_with_toolbar.xml"),