From 1e555cc712390440b617eae131c232364cb2e854 Mon Sep 17 00:00:00 2001 From: darken Date: Sun, 14 Jun 2026 11:22:39 +0200 Subject: [PATCH] fix(monitor): Fix notification color inconsistency in dark mode on One UI Remove Theme.Material3.DynamicColors.DayNight from the notification container style; it does not resolve correctly in the notification host process, causing light-mode colors to appear in dark mode. Replace all ?attr/colorAccent and ?android:attr/textColorPrimary refs in RemoteViews layouts with explicit day/night color resources (notification_icon_tint) and TextAppearance.Compat.Notification.Title defaults. Change tintMode from multiply to src_in for status glyphs; remove tint from product PNG icons to prevent silhouette rendering. Fixes #613 --- .../notification_battery_progress.xml | 2 +- .../monitor_notification_dual_pods_big.xml | 26 +++++++------------ .../monitor_notification_dual_pods_small.xml | 10 +++++++ .../monitor_notification_single_pods_big.xml | 10 +++---- ...monitor_notification_single_pods_small.xml | 6 +++++ app/src/main/res/values-night/colors.xml | 4 +++ app/src/main/res/values/colors.xml | 2 ++ app/src/main/res/values/styles.xml | 5 ---- 8 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 app/src/main/res/values-night/colors.xml diff --git a/app/src/main/res/drawable/notification_battery_progress.xml b/app/src/main/res/drawable/notification_battery_progress.xml index ee7373ff..af2c426f 100644 --- a/app/src/main/res/drawable/notification_battery_progress.xml +++ b/app/src/main/res/drawable/notification_battery_progress.xml @@ -12,7 +12,7 @@ - + diff --git a/app/src/main/res/layout/monitor_notification_dual_pods_big.xml b/app/src/main/res/layout/monitor_notification_dual_pods_big.xml index 8c026fad..b85ac878 100644 --- a/app/src/main/res/layout/monitor_notification_dual_pods_big.xml +++ b/app/src/main/res/layout/monitor_notification_dual_pods_big.xml @@ -24,8 +24,6 @@ android:id="@+id/pod_left_icon" android:layout_width="24dp" android:layout_height="24dp" - android:tintMode="multiply" - android:tint="?android:attr/colorAccent" android:src="@drawable/device_airpods_gen1_left" /> @@ -88,8 +86,6 @@ android:id="@+id/pod_case_icon" android:layout_width="24dp" android:layout_height="24dp" - android:tintMode="multiply" - android:tint="?android:attr/colorAccent" android:src="@drawable/device_airpods_gen1_case" /> @@ -142,8 +138,6 @@ android:id="@+id/pod_right_icon" android:layout_width="24dp" android:layout_height="24dp" - android:tintMode="multiply" - android:tint="?android:attr/colorAccent" android:src="@drawable/device_airpods_gen1_right" /> diff --git a/app/src/main/res/layout/monitor_notification_dual_pods_small.xml b/app/src/main/res/layout/monitor_notification_dual_pods_small.xml index 9c50b212..f6a1477d 100644 --- a/app/src/main/res/layout/monitor_notification_dual_pods_small.xml +++ b/app/src/main/res/layout/monitor_notification_dual_pods_small.xml @@ -38,6 +38,8 @@ android:layout_width="16dp" android:layout_height="16dp" android:layout_marginStart="2dp" + android:tint="@color/notification_icon_tint" + android:tintMode="src_in" android:src="@drawable/ic_baseline_power_24" /> @@ -76,6 +80,8 @@ android:layout_width="16dp" android:layout_height="16dp" android:layout_marginStart="2dp" + android:tint="@color/notification_icon_tint" + android:tintMode="src_in" android:src="@drawable/ic_baseline_power_24" /> @@ -105,6 +111,8 @@ android:layout_width="16dp" android:layout_height="16dp" android:layout_marginStart="2dp" + android:tint="@color/notification_icon_tint" + android:tintMode="src_in" android:src="@drawable/ic_baseline_power_24" /> diff --git a/app/src/main/res/layout/monitor_notification_single_pods_big.xml b/app/src/main/res/layout/monitor_notification_single_pods_big.xml index b5d6bf7f..daecd9cb 100644 --- a/app/src/main/res/layout/monitor_notification_single_pods_big.xml +++ b/app/src/main/res/layout/monitor_notification_single_pods_big.xml @@ -24,8 +24,6 @@ android:id="@+id/headphones_icon" android:layout_width="24dp" android:layout_height="24dp" - android:tintMode="multiply" - android:tint="?android:attr/colorAccent" android:src="@drawable/twotone_headphones_24" /> diff --git a/app/src/main/res/layout/monitor_notification_single_pods_small.xml b/app/src/main/res/layout/monitor_notification_single_pods_small.xml index 02a7e39a..4bc488a9 100644 --- a/app/src/main/res/layout/monitor_notification_single_pods_small.xml +++ b/app/src/main/res/layout/monitor_notification_single_pods_small.xml @@ -30,6 +30,8 @@ android:id="@+id/headphones_battery_icon" style="@style/PodInfoItemIcon.Notification" android:layout_marginStart="12dp" + android:tint="@color/notification_icon_tint" + android:tintMode="src_in" android:src="@drawable/ic_baseline_battery_unknown_24" /> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 00000000..faedd00a --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,4 @@ + + + #EEEEEE + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 77c8e5d2..145dcde0 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -60,4 +60,6 @@ #3f7aff #ffd83c #41eb8e + + #757575 \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 165f660c..13870f10 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -13,15 +13,11 @@