Skip to content

Commit

Permalink
feat(theming): fixed colorblind themes when adding an exception theme
Browse files Browse the repository at this point in the history
  • Loading branch information
gregroyal committed Aug 22, 2019
1 parent 93b0720 commit 6396509
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/os/config/themesettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,19 @@ os.config.ThemeSettings.setTheme = function() {
os.settings.set(os.config.ThemeSettings.Keys.ACCESSIBLE_THEME, accessibleTheme);
}

var theme = goog.object.findValue(os.config.ThemeSettings.themeExceptions, function(value, key) {
var theme = null;
var exceptionTheme = goog.object.findValue(os.config.ThemeSettings.themeExceptions, function(value, key) {
return window.location.hash.indexOf(key) != -1;
});
if (accessibleTheme && accessibleThemes[displayTheme]) {

if (exceptionTheme) {
if (accessibleTheme && accessibleThemes[exceptionTheme]) {
// Get this flavor of the theme
theme = accessibleThemes[exceptionTheme][accessibleTheme];
} else {
theme = accessibleThemes[exceptionTheme]['Normal'];
}
} else if (accessibleTheme && accessibleThemes[displayTheme]) {
// Get this flavor of the theme
theme = accessibleThemes[displayTheme][accessibleTheme];
}
Expand Down

0 comments on commit 6396509

Please sign in to comment.