fixed current theme indicator not behaving properly

This commit is contained in:
Jack 2020-10-09 16:03:41 +01:00
parent 888df4413a
commit b17ffe3ec6
3 changed files with 5 additions and 0 deletions

View file

@ -1421,6 +1421,7 @@ $("#commandLineWrapper #commandLine .suggestions").click((e) => {
$("#commandLineWrapper").click((e) => {
if ($(e.target).attr("id") === "commandLineWrapper") {
hideCommandLine();
setTheme(config.theme, true);
}
});

View file

@ -4827,6 +4827,9 @@ $(document).on("mouseenter", "#resultWordsHistory .words .word", (e) => {
});
$(document).on("click", "#bottom .leftright .right .current-theme", (e) => {
if (config.customTheme) {
togglePresetCustomTheme();
}
currentCommands.push(commandsThemes);
showCommandLine();
});

View file

@ -969,6 +969,7 @@ function applyCustomThemeColors() {
document.documentElement.style.setProperty(e, array[index]);
});
} else {
$(".current-theme").text(config.theme.replace('_',' '));
previewTheme(config.theme);
colorVars.forEach((e) => {
document.documentElement.style.setProperty(e, "");