From b0b5f92940f1d71417e3a8f2e26365213d8eb4de Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sun, 1 Sep 2024 14:36:15 -0400 Subject: [PATCH] Add setting to control tree explorer item padding (#700) --- src/App.vue | 14 ++++++++++++++ src/stores/settingStore.ts | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/App.vue b/src/App.vue index cf97f8c8a..b7f346690 100644 --- a/src/App.vue +++ b/src/App.vue @@ -60,6 +60,14 @@ watchEffect(() => { ) }) +watchEffect(() => { + const padding = useSettingStore().get('Comfy.TreeExplorer.ItemPadding') + document.documentElement.style.setProperty( + '--comfy-tree-explorer-item-padding', + `${padding}px` + ) +}) + const { t } = useI18n() const init = () => { useSettingStore().addSettings(app.ui.settings) @@ -126,6 +134,12 @@ onUnmounted(() => { }) + +