added style.compactMode handler

This commit is contained in:
srgooglo 2022-06-29 19:30:39 +02:00
parent 424b6bcc1f
commit 9b356584eb

View File

@ -12,6 +12,19 @@ export default class StyleCore extends Core {
currentVariant = null
events = {
"style.compactMode": (value = !window.app.settings.get("style.compactMode")) => {
if (value) {
return this.update({
layoutMargin: 0,
layoutPadding: 0,
})
}
return this.update({
layoutMargin: this.getValue("layoutMargin"),
layoutPadding: this.getValue("layoutPadding"),
})
},
"app.autoDarkModeToogle": (value) => {
if (value === true) {
this.handleAutoColorScheme()