diff --git a/packages/app/src/cores/style/index.jsx b/packages/app/src/cores/style/index.jsx index 654adf1f..507f1cbd 100644 --- a/packages/app/src/cores/style/index.jsx +++ b/packages/app/src/cores/style/index.jsx @@ -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()