Merge pull request #8597 from osmandapp/Fix_8513_icons_color_bug

Fix #8513 General settings: icons color bug
This commit is contained in:
max-klaus 2020-03-02 11:29:58 +03:00 committed by GitHub
commit bbf7173b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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);
}