From 30a88bd7da76a67e1592eb6f0c88e1ddf7853226 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Mon, 30 Sep 2024 22:55:02 +0900 Subject: [PATCH] fix(YouTube/Overlay buttons): paddingBottom is not set when patch option `WiderButtonsSpace` is TRUE https://github.com/inotia00/revanced-patches/pull/87 --- .../youtube/player/overlaybuttons/OverlayButtonsPatch.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt index f3d5a65a6c..b2a31d9c5f 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/player/overlaybuttons/OverlayButtonsPatch.kt @@ -212,7 +212,8 @@ object OverlayButtonsPatch : BaseResourcePatch( "@id/timestamps_container" to "14.0dip" ) - val layoutHeightWidth = if (WiderButtonsSpace == true) + val widerButtonsSpace = WiderButtonsSpace == true + val layoutHeightWidth = if (widerButtonsSpace) "56.0dip" else "48.0dip" @@ -228,7 +229,9 @@ object OverlayButtonsPatch : BaseResourcePatch( } } else if (timBarItem.containsKey(id)) { node.setAttribute("android:layout_marginBottom", marginBottom) - node.setAttribute("android:paddingBottom", timBarItem.getValue(id)) + if (!widerButtonsSpace) { + node.setAttribute("android:paddingBottom", timBarItem.getValue(id)) + } } } }