force the tinter to refresh when we change theme
This commit is contained in:
parent
8c218557df
commit
805796e4e0
1 changed files with 8 additions and 1 deletions
|
@ -101,6 +101,9 @@ class Tinter {
|
||||||
|
|
||||||
// the currently loaded theme (if any)
|
// the currently loaded theme (if any)
|
||||||
this.theme = undefined;
|
this.theme = undefined;
|
||||||
|
|
||||||
|
// whether to force a tint (e.g. after changing theme)
|
||||||
|
this.forceTint = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -153,12 +156,15 @@ class Tinter {
|
||||||
tertiaryColor = rgbToHex(rgb1);
|
tertiaryColor = rgbToHex(rgb1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.colors[0] === primaryColor &&
|
if (this.forceTint == false &&
|
||||||
|
this.colors[0] === primaryColor &&
|
||||||
this.colors[1] === secondaryColor &&
|
this.colors[1] === secondaryColor &&
|
||||||
this.colors[2] === tertiaryColor) {
|
this.colors[2] === tertiaryColor) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.forceTint = false;
|
||||||
|
|
||||||
this.colors[0] = primaryColor;
|
this.colors[0] = primaryColor;
|
||||||
this.colors[1] = secondaryColor;
|
this.colors[1] = secondaryColor;
|
||||||
this.colors[2] = tertiaryColor;
|
this.colors[2] = tertiaryColor;
|
||||||
|
@ -204,6 +210,7 @@ class Tinter {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.calcCssFixups();
|
this.calcCssFixups();
|
||||||
|
this.forceTint = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
calcCssFixups() {
|
calcCssFixups() {
|
||||||
|
|
Loading…
Reference in a new issue