From d48f5b0b3f2f29636b5ec5fce729e1594da1b9cf Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 25 Aug 2025 23:29:31 -0400 Subject: [PATCH] Allow exclusive zone modifier --- Common/SettingsData.qml | 8 ++++++++ Modules/Settings/TopBarTab.qml | 26 ++++++++++++++++++++++++++ Modules/TopBar/TopBar.qml | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Common/SettingsData.qml b/Common/SettingsData.qml index 63d30d3d..f104bdf6 100644 --- a/Common/SettingsData.qml +++ b/Common/SettingsData.qml @@ -85,6 +85,7 @@ Singleton { property bool topBarAutoHide: false property bool topBarVisible: true property real topBarSpacing: 4 + property real topBarBottomGap: 0 property real topBarInnerPadding: 8 property bool topBarSquareCorners: false property bool topBarNoBackground: false @@ -292,6 +293,7 @@ Singleton { notificationTimeoutCritical = settings.notificationTimeoutCritical !== undefined ? settings.notificationTimeoutCritical : 0 topBarSpacing = settings.topBarSpacing !== undefined ? settings.topBarSpacing : 4 + topBarBottomGap = settings.topBarBottomGap !== undefined ? settings.topBarBottomGap : 0 topBarInnerPadding = settings.topBarInnerPadding !== undefined ? settings.topBarInnerPadding : 8 topBarSquareCorners = settings.topBarSquareCorners !== undefined ? settings.topBarSquareCorners : false @@ -380,6 +382,7 @@ Singleton { "topBarAutoHide": topBarAutoHide, "topBarVisible": topBarVisible, "topBarSpacing": topBarSpacing, + "topBarBottomGap": topBarBottomGap, "topBarInnerPadding": topBarInnerPadding, "topBarSquareCorners": topBarSquareCorners, "topBarNoBackground": topBarNoBackground, @@ -911,6 +914,11 @@ Singleton { saveSettings() } + function setTopBarBottomGap(gap) { + topBarBottomGap = gap + saveSettings() + } + function setTopBarInnerPadding(padding) { topBarInnerPadding = padding saveSettings() diff --git a/Modules/Settings/TopBarTab.qml b/Modules/Settings/TopBarTab.qml index 7172f0a9..4456940d 100644 --- a/Modules/Settings/TopBarTab.qml +++ b/Modules/Settings/TopBarTab.qml @@ -692,6 +692,32 @@ Item { } } + Column { + width: parent.width + spacing: Theme.spacingS + + StyledText { + text: "Bottom Gap (Exclusive Zone)" + font.pixelSize: Theme.fontSizeSmall + color: Theme.surfaceText + font.weight: Font.Medium + } + + DankSlider { + width: parent.width + height: 24 + value: SettingsData.topBarBottomGap + minimum: -100 + maximum: 100 + unit: "" + showValue: true + onSliderValueChanged: newValue => { + SettingsData.setTopBarBottomGap( + newValue) + } + } + } + Column { width: parent.width spacing: Theme.spacingS diff --git a/Modules/TopBar/TopBar.qml b/Modules/TopBar/TopBar.qml index d10db469..73399eea 100644 --- a/Modules/TopBar/TopBar.qml +++ b/Modules/TopBar/TopBar.qml @@ -155,7 +155,7 @@ PanelWindow { right: true } - exclusiveZone: !SettingsData.topBarVisible || autoHide ? -1 : root.effectiveBarHeight + SettingsData.topBarSpacing - 2 + exclusiveZone: !SettingsData.topBarVisible || autoHide ? -1 : root.effectiveBarHeight + SettingsData.topBarSpacing - 2 + SettingsData.topBarBottomGap mask: Region { item: topBarMouseArea