From 19f29564f108284c2a7cf44da77a6ad3e0ec5b50 Mon Sep 17 00:00:00 2001 From: Dima-1 Date: Tue, 25 Feb 2020 14:19:44 +0200 Subject: [PATCH] Fix #8513 General settings: icons color bug --- OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java | 2 +- .../src/net/osmand/plus/settings/GlobalSettingsFragment.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java index aa478a2705..d53fb66350 100644 --- a/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/BaseSettingsFragment.java @@ -613,7 +613,7 @@ public abstract class BaseSettingsFragment extends PreferenceFragmentCompat impl @ColorRes protected int getActiveProfileColorRes() { - return getSelectedAppMode().getIconColorInfo().getColor(isNightMode()); + return isProfileDependent() ? getSelectedAppMode().getIconColorInfo().getColor(isNightMode()) : R.color.icon_color_active_light; } @ColorRes diff --git a/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java b/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java index 53901052e7..662274dde7 100644 --- a/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/GlobalSettingsFragment.java @@ -122,7 +122,8 @@ public class GlobalSettingsFragment extends BaseSettingsFragment implements Send } ListPreferenceEx defaultApplicationMode = (ListPreferenceEx) findPreference(settings.DEFAULT_APPLICATION_MODE.getId()); - defaultApplicationMode.setIcon(getActiveIcon(settings.DEFAULT_APPLICATION_MODE.get().getIconRes())); + defaultApplicationMode.setIcon(getIcon(settings.DEFAULT_APPLICATION_MODE.get().getIconRes(), + settings.getApplicationMode().getIconColorInfo().getColor(isNightMode()))); defaultApplicationMode.setEntries(entries); defaultApplicationMode.setEntryValues(entryValues); }