made theme debug easier by making it an actual option

This commit is contained in:
Henry Jameson 2024-06-21 23:28:24 +03:00
commit f9e407de63
9 changed files with 53 additions and 31 deletions

View file

@ -383,16 +383,16 @@ const instance = {
.then(themeData => {
commit('setInstanceOption', { name: 'themeData', value: themeData })
// No need to apply theme if there's user theme already
const { customTheme } = rootState.config
const { customTheme, themeDebug } = rootState.config
const { themeApplied } = rootState.interface
if (customTheme || themeApplied) return
// New theme presets don't have 'theme' property, they use 'source'
const themeSource = themeData.source
if (!themeData.theme || (themeSource && themeSource.themeEngineVersion === CURRENT_VERSION)) {
applyTheme(themeSource)
applyTheme(themeSource, null, themeDebug)
} else {
applyTheme(themeData.theme)
applyTheme(themeData.theme, null, themeDebug)
}
commit('setThemeApplied')
})