mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-05 00:54:32 +02:00
fix(YouTube/Overlay buttons): increase the size of the overlay button by 6% and add some bottom margin
This commit is contained in:
parent
570aa0b0fd
commit
1d052a84e0
@ -171,16 +171,13 @@ object OverlayButtonsPatch : ResourcePatch() {
|
||||
}
|
||||
|
||||
// Adjust Fullscreen Button size and padding
|
||||
val padding = "0.0dip" to arrayOf(
|
||||
"paddingLeft",
|
||||
"paddingRight",
|
||||
"paddingTop",
|
||||
"paddingBottom"
|
||||
)
|
||||
val size = "45.0dip" to arrayOf("layout_width", "layout_height")
|
||||
it.getAttributeNode("android:id")?.let { attribute ->
|
||||
if (attribute.textContent == "@id/fullscreen_button") {
|
||||
arrayOf(padding, size).forEach { (replace, attributes) ->
|
||||
arrayOf(
|
||||
"0.0dip" to arrayOf("paddingLeft", "paddingRight"),
|
||||
"22.0dip" to arrayOf("paddingBottom"),
|
||||
"48.0dip" to arrayOf("layout_height", "layout_width")
|
||||
).forEach { (replace, attributes) ->
|
||||
attributes.forEach { name ->
|
||||
it.getAttributeNode("android:$name").textContent = replace
|
||||
}
|
||||
@ -189,9 +186,10 @@ object OverlayButtonsPatch : ResourcePatch() {
|
||||
}
|
||||
|
||||
// Adjust TimeBar and Chapter bottom padding
|
||||
val timeBarChapter = "@id/time_bar_chapter_title" to "14.0dip"
|
||||
val timeStampContainer = "@id/timestamps_container" to "12.0dip"
|
||||
arrayOf(timeBarChapter, timeStampContainer).forEach { (id, replace) ->
|
||||
arrayOf(
|
||||
"@id/time_bar_chapter_title" to "14.0dip",
|
||||
"@id/timestamps_container" to "12.0dip"
|
||||
).forEach { (id, replace) ->
|
||||
it.getAttributeNode("android:id")?.let { attribute ->
|
||||
if (attribute.textContent == id) {
|
||||
it.getAttributeNode("android:paddingBottom").textContent = replace
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yt="http://schemas.android.com/apk/res-auto" android:id="@+id/youtube_controls_bottom_ui_container" android:layout_width="match_parent" android:layout_height="wrap_content" android:layoutDirection="ltr">
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/speed_dialog_button" android:paddingLeft="0dp" android:paddingTop="0dp" android:paddingRight="0dp" android:paddingBottom="0dp" android:longClickable="false" android:layout_width="45dp" android:layout_height="45dp" android:src="@drawable/revanced_speed_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_button" android:paddingLeft="0dp" android:paddingTop="0dp" android:paddingRight="0dp" android:paddingBottom="0dp" android:longClickable="false" android:layout_width="45dp" android:layout_height="45dp" android:src="@drawable/revanced_copy_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_timestamp_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" android:paddingLeft="0dp" android:paddingTop="0dp" android:paddingRight="0dp" android:paddingBottom="0dp" android:longClickable="false" android:layout_width="45dp" android:layout_height="45dp" android:src="@drawable/revanced_copy_icon_with_time" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/always_repeat_button" android:paddingLeft="0dp" android:paddingTop="0dp" android:paddingRight="0dp" android:paddingBottom="0dp" android:longClickable="false" android:layout_width="45dp" android:layout_height="45dp" android:src="@drawable/revanced_repeat_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/external_download_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/external_download_button" android:paddingLeft="0dp" android:paddingTop="0dp" android:paddingRight="0dp" android:paddingBottom="0dp" android:longClickable="false" android:layout_width="45dp" android:layout_height="45dp" android:src="@drawable/revanced_download_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/speed_dialog_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_speed_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/copy_video_url_timestamp_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/copy_video_url_timestamp_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_copy_icon_with_time" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/always_repeat_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/always_repeat_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_repeat_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/external_download_button" style="@style/YouTubePlayerButton"/>
|
||||
<com.google.android.libraries.youtube.common.ui.TouchImageView android:id="@+id/external_download_button" android:paddingLeft="0.0dip" android:paddingTop="22.0dip" android:paddingRight="0.0dip" android:paddingBottom="22.0dip" android:longClickable="false" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/revanced_download_icon" android:scaleType="center" yt:layout_constraintBottom_toTopOf="@+id/quick_actions_container" yt:layout_constraintRight_toLeftOf="@+id/fullscreen_button" style="@style/YouTubePlayerButton"/>
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user