fix: Update themes to correct poll/black theme issues (#255)

`Theme.Pachli` was being overriden on v29+ devices which meant that poll
options were showing with too much padding. Fix that by using `AppTheme`
as the final theme, and basing that off `Theme.Pachli`.

Black themes were using dark grey for toolbar and tab backgrounds, so
fix that too for a seamless experience with the black theme.
This commit is contained in:
Nik Clayton 2023-11-15 15:59:01 +01:00 committed by GitHub
parent 09dc830c86
commit fce34cced1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 15 deletions

View File

@ -1274,7 +1274,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `@color/black` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `@color/black` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;@color/black&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -1285,7 +1285,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `?android:attr/colorBackground` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `?android:attr/colorBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?android:attr/colorBackground&quot;>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -1296,7 +1296,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?attr/selectableItemBackground&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -1307,7 +1307,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?attr/selectableItemBackground&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -1318,7 +1318,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackgroundBorderless` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackgroundBorderless` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?attr/selectableItemBackgroundBorderless&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -1329,7 +1329,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?attr/selectableItemBackground&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -1340,7 +1340,7 @@
<issue
id="Overdraw"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/Theme.Pachli`)"
message="Possible overdraw: Root element paints background `?attr/selectableItemBackground` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
errorLine1=" android:background=&quot;?attr/selectableItemBackground&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
@ -2049,7 +2049,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/styles.xml"
line="124"
line="126"
column="12"/>
</issue>
@ -2060,7 +2060,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/values/styles.xml"
line="151"
line="164"
column="12"/>
</issue>
@ -2511,7 +2511,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/app/pachli/components/conversation/ConversationsFragment.kt"
line="151"
line="152"
column="29"/>
</issue>
@ -2522,7 +2522,7 @@
errorLine2=" ~~~~~~~">
<location
file="src/main/java/app/pachli/components/conversation/ConversationsFragment.kt"
line="153"
line="154"
column="37"/>
</issue>
@ -3644,7 +3644,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/java/app/pachli/fragment/SFragment.kt"
line="223"
line="225"
column="48"/>
</issue>
@ -3754,7 +3754,7 @@
errorLine2=" ~~~~~~~~~">
<location
file="src/main/java/app/pachli/components/timeline/TimelineFragment.kt"
line="194"
line="195"
column="47"/>
</issue>

View File

@ -19,7 +19,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.Pachli"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="false"
android:localeConfig="@xml/locales_config">

View File

@ -16,7 +16,7 @@
-->
<resources>
<style name="Theme.Pachli" parent="Base.Theme.Pachli">
<style name="AppTheme" parent="Theme.Pachli">
<!-- Transparent system bars for edge-to-edge. -->
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>

View File

@ -83,6 +83,8 @@
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
</style>
<style name="AppTheme" parent="Theme.Pachli" />
<style name="Pachli.Widget.Toolbar" parent="Widget.Material3.Toolbar">
<item name="android:minHeight">?attr/actionBarSize</item>
</style>
@ -143,6 +145,17 @@
<!-- TODO: Remove this, use colorControlNormal everywhere instead of iconColor -->
<item name="iconColor">?attr/colorControlNormal</item>
<item name="toolbarStyle">@style/Pachli.Widget.Toolbar.Black</item>
<item name="tabStyle">@style/Pachli.Widget.Material3.TabLayout</item>
</style>
<style name="Pachli.Widget.Toolbar.Black" parent="Widget.Material3.Toolbar">
<item name="android:background">@color/black</item>
</style>
<style name="Pachli.Widget.Material3.TabLayout" parent="Widget.Material3.TabLayout">
<item name="android:background">@color/black</item>
</style>
<style name="Theme.Pachli.Black" parent="Base.Theme.Black" />