fix(theme): bgLayer beim Custom-Wechsel ohne eigenes Bild leeren
Preset->Custom liess das alte Preset-Hintergrundbild im bgLayer haengen, weil applyCustomTheme den bgLayer nie anfasste. Jetzt wird er geleert, wenn keine gueltige bgUrl gesetzt ist, sodass --bg-primary (Solid) durchscheint.
This commit is contained in:
@@ -189,6 +189,12 @@ function applyCustomTheme(ct) {
|
|||||||
card.setAttribute('aria-pressed', on ? 'true' : 'false');
|
card.setAttribute('aria-pressed', on ? 'true' : 'false');
|
||||||
});
|
});
|
||||||
updateContrastIndicator(textPrimary, bgPrimary);
|
updateContrastIndicator(textPrimary, bgPrimary);
|
||||||
|
|
||||||
|
// Kein eigenes Bild gesetzt -> bgLayer leeren, damit --bg-primary (Solid) durchscheint
|
||||||
|
// statt des Hintergrundbilds eines zuvor gewaehlten Presets (das sonst haengen bliebe).
|
||||||
|
if (!(settings.bgUrl && isValidBgUrl(settings.bgUrl))) {
|
||||||
|
document.getElementById('bgLayer').style.backgroundImage = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entfernt die 6 Inline-Vars (Rueckwechsel auf Preset / Reset).
|
// Entfernt die 6 Inline-Vars (Rueckwechsel auf Preset / Reset).
|
||||||
|
|||||||
Reference in New Issue
Block a user