feat(YouTube - Swipe controls): Add option for vertical progress bar (#4811)

This commit is contained in:
MarcaD
2025-04-23 14:30:41 +03:00
committed by GitHub
parent 81999d8cd5
commit ebee07ec3a
11 changed files with 536 additions and 169 deletions

View File

@ -6,6 +6,7 @@ import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod.Companion.toMu
import app.revanced.patches.all.misc.resources.addResources
import app.revanced.patches.all.misc.resources.addResourcesPatch
import app.revanced.patches.shared.misc.settings.preference.InputType
import app.revanced.patches.shared.misc.settings.preference.ListPreference
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
import app.revanced.patches.shared.misc.settings.preference.TextPreference
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
@ -42,9 +43,13 @@ private val swipeControlsResourcePatch = resourcePatch {
SwitchPreference("revanced_swipe_haptic_feedback"),
SwitchPreference("revanced_swipe_save_and_restore_brightness"),
SwitchPreference("revanced_swipe_lowest_value_enable_auto_brightness"),
SwitchPreference("revanced_swipe_show_circular_overlay"),
SwitchPreference("revanced_swipe_overlay_minimal_style"),
ListPreference(
"revanced_swipe_overlay_style",
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_text_overlay_size", inputType = InputType.NUMBER),
TextPreference("revanced_swipe_overlay_timeout", inputType = InputType.NUMBER),
TextPreference("revanced_swipe_threshold", inputType = InputType.NUMBER),
TextPreference("revanced_swipe_volume_sensitivity", inputType = InputType.NUMBER),

View File

@ -135,6 +135,27 @@
<item>IOS_UNPLUGGED</item>
</string-array>
</patch>
<patch id="interaction.swipecontrols.swipeControlsResourcePatch">
<string-array name="revanced_swipe_overlay_style_entries">
<item>@string/revanced_swipe_overlay_style_entry_1</item>
<item>@string/revanced_swipe_overlay_style_entry_2</item>
<item>@string/revanced_swipe_overlay_style_entry_3</item>
<item>@string/revanced_swipe_overlay_style_entry_4</item>
<item>@string/revanced_swipe_overlay_style_entry_5</item>
<item>@string/revanced_swipe_overlay_style_entry_6</item>
<item>@string/revanced_swipe_overlay_style_entry_7</item>
</string-array>
<string-array name="revanced_swipe_overlay_style_entry_values">
<!-- Extension enum names. -->
<item>HORIZONTAL</item>
<item>HORIZONTAL_MINIMAL_TOP</item>
<item>HORIZONTAL_MINIMAL_CENTER</item>
<item>CIRCULAR</item>
<item>CIRCULAR_MINIMAL</item>
<item>VERTICAL</item>
<item>VERTICAL_MINIMAL</item>
</string-array>
</patch>
<patch id="layout.spoofappversion.spoofAppVersionPatch">
<string-array name="revanced_spoof_app_version_target_entries">
<item>@string/revanced_spoof_app_version_target_entry_1</item>

View File

@ -520,21 +520,30 @@ Adjust volume by swiping vertically on the right side of the screen"</string>
<string name="revanced_swipe_lowest_value_enable_auto_brightness_title">Enable auto-brightness gesture</string>
<string name="revanced_swipe_lowest_value_enable_auto_brightness_summary_on">Swiping down to the lowest value of the brightness gesture enable auto-brightness</string>
<string name="revanced_swipe_lowest_value_enable_auto_brightness_summary_off">Swiping down to the lowest value does not enable auto-brightness</string>
<string name="revanced_swipe_lowest_value_enable_auto_brightness_overlay_text">Auto</string>
<string name="revanced_swipe_overlay_timeout_title">Swipe overlay timeout</string>
<string name="revanced_swipe_overlay_timeout_summary">The amount of milliseconds the overlay is visible</string>
<string name="revanced_swipe_overlay_background_opacity_title">Swipe overlay background opacity</string>
<string name="revanced_swipe_overlay_background_opacity_summary">Opacity value between 0-100</string>
<string name="revanced_swipe_overlay_background_opacity_invalid_toast">Swipe opacity must be between 0-100</string>
<string name="revanced_swipe_overlay_progress_color_title">Swipe overlay progress bar color</string>
<string name="revanced_swipe_overlay_progress_color_summary">The color of the progress bar for volume and brightness controls</string>
<string name="revanced_swipe_overlay_progress_color_invalid_toast">Invalid progress bar color</string>
<string name="revanced_swipe_text_overlay_size_title">Swipe overlay text size</string>
<string name="revanced_swipe_text_overlay_size_summary">The text size for swipe overlay between 1-30</string>
<string name="revanced_swipe_text_overlay_size_invalid_toast">The text size must be between 1-30</string>
<string name="revanced_swipe_threshold_title">Swipe magnitude threshold</string>
<string name="revanced_swipe_threshold_summary">The amount of threshold for swipe to occur</string>
<string name="revanced_swipe_volume_sensitivity_title">Volume swipe sensitivity</string>
<string name="revanced_swipe_volume_sensitivity_summary">How much the volume changes per swipe</string>
<string name="revanced_swipe_show_circular_overlay_title">Show circular overlay</string>
<string name="revanced_swipe_show_circular_overlay_summary_on">Circular overlay is shown</string>
<string name="revanced_swipe_show_circular_overlay_summary_off">Horizontal overlay is shown</string>
<string name="revanced_swipe_overlay_minimal_style_title">Enable minimal style</string>
<string name="revanced_swipe_overlay_minimal_style_summary_on">Minimal overlay style is enabled</string>
<string name="revanced_swipe_overlay_minimal_style_summary_off">Minimal overlay style is disabled</string>
<string name="revanced_swipe_overlay_style_title">Swipe overlay style</string>
<string name="revanced_swipe_overlay_style_entry_1">Horizontal overlay</string>
<string name="revanced_swipe_overlay_style_entry_2">Horizontal overlay (minimal - top)</string>
<string name="revanced_swipe_overlay_style_entry_3">Horizontal overlay (minimal - center)</string>
<string name="revanced_swipe_overlay_style_entry_4">Circular overlay</string>
<string name="revanced_swipe_overlay_style_entry_5">Circular overlay (minimal)</string>
<string name="revanced_swipe_overlay_style_entry_6">Vertical overlay</string>
<string name="revanced_swipe_overlay_style_entry_7">Vertical overlay (minimal)</string>
<string name="revanced_swipe_change_video_title">Enable swipe to change videos</string>
<string name="revanced_swipe_change_video_summary_on">Swiping in fullscreen mode will change to the next/previous video</string>
<string name="revanced_swipe_change_video_summary_off">Swiping in fullscreen mode will not change to the next/previous video</string>