mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-03 16:14:28 +02:00
fix(YouTube/SponsorBlock): modernize skip buttons
This commit is contained in:
parent
0daed9a909
commit
2bc970e6d6
@ -68,6 +68,11 @@ object SponsorBlockPatch : ResourcePatch() {
|
||||
"layout",
|
||||
"inline_sponsor_overlay.xml",
|
||||
"skip_sponsor_button.xml"
|
||||
),
|
||||
ResourceGroup(
|
||||
"drawable",
|
||||
"ns_bg.xml",
|
||||
"sb_btn_bg.xml"
|
||||
)
|
||||
).forEach { resourceGroup ->
|
||||
context.copyResources("youtube/sponsorblock/shared", resourceGroup)
|
||||
@ -88,8 +93,7 @@ object SponsorBlockPatch : ResourcePatch() {
|
||||
"ic_sb_forward.xml",
|
||||
"ic_sb_logo.xml",
|
||||
"ic_sb_publish.xml",
|
||||
"ic_sb_voting.xml",
|
||||
"ns_bg.xml"
|
||||
"ic_sb_voting.xml"
|
||||
)
|
||||
).forEach { resourceGroup ->
|
||||
context.copyResources("youtube/sponsorblock/outline", resourceGroup)
|
||||
|
@ -6,7 +6,7 @@
|
||||
android:id="@+id/sb_new_segment_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#66000000"
|
||||
android:background="@drawable/ns_bg"
|
||||
android:gravity="start|center"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
@ -6,5 +6,5 @@
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="m 15 2 l -7.92 3.52 v 4.4 c 0 5.72 3.52 10.56 7.92 11.44 c 4.4 -0.88 7.92 -5.72 7.92 -11.44 l 0 -4.4 z m 7.04 7.92 c 0 6.16 -3.52 9.24 -7.04 10.56 c -3.52 -1.32 -7.04 -4.4 -7.04 -10.56 l 0 -3.784 l 7.04 -2.992 l 7.04 2.992 l 0 3.784 z" />
|
||||
android:pathData="M 12 2.32 L 4.08 5.84 V 10.24 C 4.08 15.96 7.6 20.8 12 21.68 C 16.4 20.8 19.92 15.96 19.92 10.24 L 19.92 5.84 Z M 19.04 10.24 C 19.04 16.4 15.52 19.48 12 20.8 C 8.48 19.48 4.96 16.4 4.96 10.24 L 4.96 6.456 L 12 3.464 L 19.04 6.456 L 19.04 10.24 Z" />
|
||||
</vector>
|
||||
|
@ -2,10 +2,10 @@
|
||||
android:alpha="0.95"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#ffffffff">
|
||||
<path
|
||||
android:fillColor="#ffffffff"
|
||||
android:pathData="M87.69,528.42Q61.75,528.42 43.95,510.83Q26.15,493.23 26.15,466.89L26.15,232.77Q26.15,226.05 28.92,219.54Q31.69,213.04 37.29,207.44L219.08,25.65L234.62,41.19Q238.26,44.92 240.82,49.76Q243.38,54.6 243.38,58.58L243.38,64.42L208.62,214.58L404.04,214.58Q427.82,214.58 443.6,230.5Q459.39,246.42 459.39,269.96L459.39,282.29Q459.39,288.5 458.39,293.1Q457.39,297.7 455.39,302.58L368.15,504.42Q362.97,515.86 353.46,522.14Q343.96,528.42 331.79,528.42L87.69,528.42ZM333.39,491.5L422.46,283.35L422.46,276.11Q422.46,265.73 415.54,258.61Q408.61,251.5 397.85,251.5L164.15,251.5L196.77,100.62L63.08,234.46L63.08,466.89Q63.08,477.65 70,484.58Q76.92,491.5 87.69,491.5L333.39,491.5ZM740.92,933.35L725.24,917.77Q721.88,914.35 719.25,909.51Q716.61,904.66 716.61,900.4L716.61,894.58L751.38,744.42L555.96,744.42Q532.18,744.42 516.4,728.69Q500.61,712.96 500.61,689.04L500.61,677.05Q500.61,670.89 501.61,666.35Q502.61,661.81 504.61,656.42L591.85,454.58Q596.92,443.58 606.35,437.08Q615.77,430.58 628.15,430.58L872.31,430.58Q898.24,430.58 916.05,448.38Q933.85,466.18 933.85,492.11L933.85,726.27Q933.85,733.5 930.94,740.02Q928.04,746.54 922.61,751.65L740.92,933.35ZM626.61,467.5L537.54,675.65L537.54,682.89Q537.54,693.65 544.46,700.58Q551.39,707.5 562.15,707.5L795.85,707.5L763.23,858.77L896.92,724.92L896.92,492.11Q896.92,481.73 890,474.61Q883.08,467.5 872.31,467.5L626.61,467.5ZM63.08,466.89L63.08,234.46L63.08,234.46L63.08,251.5L63.08,251.5Q63.08,251.5 63.08,258.61Q63.08,265.73 63.08,276.11L63.08,283.35L63.08,491.5L63.08,491.5Q63.08,491.5 63.08,484.58Q63.08,477.65 63.08,466.89ZM896.92,492.11L896.92,724.92L896.92,724.92L896.92,707.5L896.92,707.5Q896.92,707.5 896.92,700.58Q896.92,693.65 896.92,682.89L896.92,675.65L896.92,467.5L896.92,467.5Q896.92,467.5 896.92,474.61Q896.92,481.73 896.92,492.11Z"/>
|
||||
android:pathData="M 3.31 13.029 Q 2.7379 13.029 2.3453 12.641 Q 1.9528 12.253 1.9528 11.6722 L 1.9528 6.5093 Q 1.9528 6.3611 2.0139 6.2175 Q 2.075 6.0741 2.1985 5.9506 L 6.2073 1.9417 L 6.5501 2.2844 Q 6.6303 2.3667 6.6867 2.4734 Q 6.7432 2.5802 6.7432 2.6679 L 6.7432 2.7968 L 5.9767 6.1081 L 10.2861 6.1081 Q 10.8105 6.1081 11.1585 6.4592 Q 11.5067 6.8103 11.5067 7.3293 L 11.5067 7.6013 Q 11.5067 7.7382 11.4846 7.8396 Q 11.4626 7.941 11.4185 8.0486 L 9.4946 12.4998 Q 9.3805 12.7519 9.1707 12.8905 Q 8.9612 13.029 8.6929 13.029 L 3.31 13.029 Z M 8.728 12.2148 L 10.6923 7.6246 L 10.6923 7.465 Q 10.6923 7.2361 10.5398 7.0791 Q 10.387 6.9222 10.1497 6.9222 L 4.996 6.9222 L 5.7154 3.595 L 2.7672 6.5465 L 2.7672 11.6722 Q 2.7672 11.9095 2.9198 12.0622 Q 3.0724 12.2148 3.31 12.2148 L 8.728 12.2148 Z M 17.7151 21.9586 L 17.3693 21.6151 Q 17.2952 21.5396 17.2372 21.4329 Q 17.1791 21.3259 17.1791 21.232 L 17.1791 21.1037 L 17.9458 17.7922 L 13.6363 17.7922 Q 13.1119 17.7922 12.7639 17.4454 Q 12.4158 17.0985 12.4158 16.571 L 12.4158 16.3066 Q 12.4158 16.1707 12.4378 16.0707 Q 12.4599 15.9705 12.504 15.8516 L 14.4278 11.4006 Q 14.5395 11.158 14.7475 11.0147 Q 14.9552 10.8714 15.2282 10.8714 L 20.6124 10.8714 Q 21.1843 10.8714 21.5772 11.2639 Q 21.9697 11.6565 21.9697 12.2283 L 21.9697 17.3919 Q 21.9697 17.5515 21.9054 17.6952 Q 21.8415 17.839 21.7218 17.9518 L 17.7151 21.9586 Z M 15.1944 11.6856 L 13.23 16.2757 L 13.23 16.4355 Q 13.23 16.6726 13.3826 16.8255 Q 13.5355 16.9781 13.7728 16.9781 L 18.9265 16.9781 L 18.2071 20.314 L 21.1552 17.3622 L 21.1552 12.2283 Q 21.1552 11.9994 21.0026 11.8424 Q 20.85 11.6856 20.6124 11.6856 L 15.1944 11.6856 Z M 2.7672 11.6722 L 2.7672 6.5465 L 2.7672 6.5465 L 2.7672 6.9222 L 2.7672 6.9222 Q 2.7672 6.9222 2.7672 7.0791 Q 2.7672 7.2361 2.7672 7.465 L 2.7672 7.6246 L 2.7672 12.2148 L 2.7672 12.2148 Q 2.7672 12.2148 2.7672 12.0622 Q 2.7672 11.9095 2.7672 11.6722 Z M 21.1552 12.2283 L 21.1552 17.3622 L 21.1552 17.3622 L 21.1552 16.9781 L 21.1552 16.9781 Q 21.1552 16.9781 21.1552 16.8255 Q 21.1552 16.6726 21.1552 16.4355 L 21.1552 16.2757 L 21.1552 11.6856 L 21.1552 11.6856 Q 21.1552 11.6856 21.1552 11.8424 Q 21.1552 11.9994 21.1552 12.2283 Z"/>
|
||||
</vector>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#1c1b1b"/>
|
||||
<solid android:color="#cc1c1b1b"/>
|
||||
<corners android:radius="10dp"/>
|
||||
</shape>
|
||||
</shape>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#cc1c1b1b"/>
|
||||
<corners android:radius="20dp"/>
|
||||
</shape>
|
@ -9,6 +9,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/inline_controls_bottom_bar_height"
|
||||
android:layout_marginStart="@dimen/margin_start"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
@ -20,6 +21,7 @@
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/inline_controls_bottom_bar_height"
|
||||
android:layout_marginEnd="@dimen/margin_end"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
|
||||
@ -30,6 +32,7 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/brand_interaction_default_bottom_margin"
|
||||
android:layout_marginStart="@dimen/margin_start"
|
||||
android:focusable="true"
|
||||
android:visibility="gone" />
|
||||
</merge>
|
@ -3,6 +3,7 @@
|
||||
xmlns:yt="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:background="@drawable/sb_btn_bg"
|
||||
android:id="@+id/sb_skip_sponsor_button_container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
@ -12,10 +13,11 @@
|
||||
|
||||
<com.google.android.libraries.youtube.common.ui.YouTubeTextView
|
||||
android:id="@+id/sb_skip_sponsor_button_text"
|
||||
android:includeFontPadding="false"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingLeft="@dimen/add_text_side_padding"
|
||||
android:paddingRight="@dimen/ad_overlay_ad_text_padding"
|
||||
android:singleLine="true"
|
||||
android:text="@string/sb_skip_button_compact"
|
||||
@ -24,12 +26,12 @@
|
||||
yt:robotoFont="light" />
|
||||
|
||||
<ImageView
|
||||
android:alpha="0.8"
|
||||
android:contentDescription="@null"
|
||||
android:id="@+id/sb_skip_sponsor_button_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:alpha="0.8"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/quantum_ic_skip_next_white_24" />
|
||||
</LinearLayout>
|
||||
</merge>
|
Loading…
x
Reference in New Issue
Block a user