Start work on resource patches.

This commit is contained in:
clienthax 2021-01-02 16:44:29 +00:00
parent 34ed66d290
commit d9e7c903d9
8 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<diffs>
<diff file="res/menu/menu_chat_toolbar.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="menu/item[@android:icon='@drawable/ic_call_24dp']/@app:showAsAction">never</replace>
<replace sel="menu/item[@android:icon='@drawable/ic_videocam_white_24dp']/@app:showAsAction">never</replace>
<replace sel="menu/item[@android:icon='@drawable/ic_search_white_24dp']/@app:showAsAction">always</replace>
</diff>
</diffs>

View file

@ -0,0 +1,6 @@
<diffs>
<diff file="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Remove android:screenOrientation entry -->
<remove msel="manifest/application/activity/@android:screenOrientation"/>
</diff>
</diffs>

View file

@ -0,0 +1,65 @@
<diffs>
<diff file="res/drawable/drawable_bg_corners_20dp.xml">
<!-- TODO Seems to be missing in 1368 -->
<replace sel="shape/solid/@android:color">@android:color/transparent</replace>
</diff>
<diff file="res/drawable/drawable_circle_black.xml" xmlns:android="http://schemas.android.com/apk/res/android">
<replace sel="shape/solid/@android:color">@android:color/transparent</replace>
</diff>
<diff file="res/drawable/drawable_overlay_channels_active_dark.xml" xmlns:android="http://schemas.android.com/apk/res/android">
<replace sel="layer-list/item/shape/solid/@android:color">@color/primary_500</replace>
</diff>
<diff file="res/layout/widget_chat_input.xml" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<replace sel="LinearLayout/LinearLayout/RelativeLayout/@android:background">@color/primary_600</replace>
</diff>
<diff file="res/values/colors.xml">
<replace sel="resources/color[@name='dark_grey_2']/text()">#ff000000</replace>
<replace sel="resources/color[@name='dark_grey_2_alpha_10']/text()">#ff000000</replace>
<replace sel="resources/color[@name='design_dark_default_color_background']/text()">#ff000000</replace>
<replace sel="resources/color[@name='design_dark_default_color_surface']/text()">#ff000000</replace>
<replace sel="resources/color[@name='grey_account']/text()">#ff000000</replace>
<replace sel="resources/color[@name='grey_unread']/text()">#ff000000</replace>
<replace sel="resources/color[@name='link']/text()">#ff50f148</replace>
<replace sel="resources/color[@name='primary_500']/text()">#ff333333</replace>
<replace sel="resources/color[@name='primary_500_alpha_20']/text()">#330f0f0f</replace>
<replace sel="resources/color[@name='primary_500_alpha_30']/text()">#4d0f0f0f</replace>
<replace sel="resources/color[@name='primary_500_alpha_32']/text()">#510f0f0f</replace>
<replace sel="resources/color[@name='primary_500_alpha_60']/text()">#990f0f0f</replace>
<replace sel="resources/color[@name='primary_600']/text()">#ff000000</replace>
<replace sel="resources/color[@name='primary_600_alpha_60']/text()">#99000000</replace>
<replace sel="resources/color[@name='primary_630']/text()">#ff000000</replace>
<replace sel="resources/color[@name='primary_630_alpha_60']/text()">#99000000</replace>
<replace sel="resources/color[@name='primary_630_alpha_90']/text()">#e6000000</replace>
<replace sel="resources/color[@name='primary_660']/text()">#ff000000</replace>
<replace sel="resources/color[@name='primary_660_alpha_90']/text()">#e6000000</replace>
<replace sel="resources/color[@name='primary_700']/text()">#ff000000</replace>
<replace sel="resources/color[@name='primary_700_alpha_50']/text()">#80000000</replace>
<replace sel="resources/color[@name='primary_700_alpha_60']/text()">#990f0f0f</replace>
<replace sel="resources/color[@name='primary_dark_600']/text()">#ff000000</replace>
<replace sel="resources/color[@name='primary_dark_630']/text()">#ff000000</replace>
<replace sel="resources/color[@name='primary_dark_700']/text()">#ff000000</replace>
<replace sel="resources/color[@name='purple_brand']/text()">#ff9c4249</replace>
<replace sel="resources/color[@name='purple_brand_alpha_10']/text()">#1a9c4249</replace>
<replace sel="resources/color[@name='purple_brand_dark']/text()">#ff000000</replace>
<replace sel="resources/color[@name='tooltip_background_dark']/text()">#e6000000</replace>
</diff>
<diff file="res/values/styles.xml">
<!-- Dark -->
<replace sel="resources/style[@name='AppTheme_Base_Dark']/item[@name='theme_chat_blocked_bg']/text()">@color/primary_500</replace>
<replace sel="resources/style[@name='AppTheme_Base_Dark']/item[@name='theme_chat_spoiler_bg']/text()">@color/primary_500</replace>
<replace sel="resources/style[@name='AppTheme_Dark_BottomSheet']/item[@name='colorPrimaryDark']/text()">@color/primary_630</replace>
<!-- Light -->
<replace sel="resources/style[@name='AppTheme_Base_Light']/item[@name='theme_chat_mentioned_me']/text()">@color/purple_brand_alpha_10</replace>
<replace sel="resources/style[@name='AppTheme_Base_Light']/item[@name='theme_chat_spoiler_bg']/text()">@color/primary_500</replace>
<replace sel="resources/style[@name='AppTheme_Dark_BottomSheet']/item[@name='colorPrimaryDark']/text()">@color/primary_630</replace>
</diff>
</diffs>

View file

@ -0,0 +1,13 @@
<diffs>
<diff file="res/layout/widget_chat_list_adapter_item_blocked.xml" xmlns:android="http://schemas.android.com/apk/res/android">
<replace sel="RelativeLayout/@android:paddingLeft">0px</replace>
<replace sel="RelativeLayout/@android:paddingTop">0px</replace>
<replace sel="RelativeLayout/@android:paddingRight">0px</replace>
<replace sel="RelativeLayout/@android:layout_width">0px</replace>
<replace sel="RelativeLayout/@android:layout_height">0px</replace>
<replace sel="RelativeLayout/@android:layout_marginLeft">0px</replace>
<replace sel="RelativeLayout/TextView/@android:textSize">0sp</replace>
<replace sel="RelativeLayout/TextView/@android:paddingTop">0dip</replace>
<replace sel="RelativeLayout/TextView/@android:paddingBottom">0dip</replace>
</diff>
</diffs>

View file

@ -0,0 +1,5 @@
<diffs>
<diff file="res/values/strings.xml">
<replace sel="resources/string[@name='com_crashlytics_android_build_id']/text()">00000000-0000-0000-0000-000000000000</replace>
</diff>
</diffs>

View file

@ -0,0 +1,10 @@
<diffs>
<diff file="res/values/dimens.xml">
<replace sel="/resources/dimen[@name='guild_icon_radius']/text()">0.0dip</replace>
</diff>
<diff file="res/values/styles.xml">
<replace sel="resources/style[@name='Avatar']/item[@name='roundAsCircle']/text()">false</replace>
<add pos="after" sel="resources/style[@name='Avatar']/item[@name='roundAsCircle']"><item name="roundedCornerRadius">3dp</item></add>
</diff>
</diffs>

1
patches/usage.txt Normal file
View file

@ -0,0 +1 @@
java -cp xml-patch-0.3.1.jar com.github.dnault.xmlpatch.BatchPatcher --patch path/to/patch.xml --srcdir path/to/resources --destdir out

BIN
patches/xml-patch-0.3.1.jar Normal file

Binary file not shown.