1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-29 16:02:51 -05:00

Allow exclusive zone modifier

This commit is contained in:
bbedward
2025-08-25 23:29:31 -04:00
parent f074333c35
commit d48f5b0b3f
3 changed files with 35 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ Singleton {
property bool topBarAutoHide: false property bool topBarAutoHide: false
property bool topBarVisible: true property bool topBarVisible: true
property real topBarSpacing: 4 property real topBarSpacing: 4
property real topBarBottomGap: 0
property real topBarInnerPadding: 8 property real topBarInnerPadding: 8
property bool topBarSquareCorners: false property bool topBarSquareCorners: false
property bool topBarNoBackground: false property bool topBarNoBackground: false
@@ -292,6 +293,7 @@ Singleton {
notificationTimeoutCritical = settings.notificationTimeoutCritical notificationTimeoutCritical = settings.notificationTimeoutCritical
!== undefined ? settings.notificationTimeoutCritical : 0 !== undefined ? settings.notificationTimeoutCritical : 0
topBarSpacing = settings.topBarSpacing !== undefined ? settings.topBarSpacing : 4 topBarSpacing = settings.topBarSpacing !== undefined ? settings.topBarSpacing : 4
topBarBottomGap = settings.topBarBottomGap !== undefined ? settings.topBarBottomGap : 0
topBarInnerPadding = settings.topBarInnerPadding !== undefined ? settings.topBarInnerPadding : 8 topBarInnerPadding = settings.topBarInnerPadding !== undefined ? settings.topBarInnerPadding : 8
topBarSquareCorners = settings.topBarSquareCorners topBarSquareCorners = settings.topBarSquareCorners
!== undefined ? settings.topBarSquareCorners : false !== undefined ? settings.topBarSquareCorners : false
@@ -380,6 +382,7 @@ Singleton {
"topBarAutoHide": topBarAutoHide, "topBarAutoHide": topBarAutoHide,
"topBarVisible": topBarVisible, "topBarVisible": topBarVisible,
"topBarSpacing": topBarSpacing, "topBarSpacing": topBarSpacing,
"topBarBottomGap": topBarBottomGap,
"topBarInnerPadding": topBarInnerPadding, "topBarInnerPadding": topBarInnerPadding,
"topBarSquareCorners": topBarSquareCorners, "topBarSquareCorners": topBarSquareCorners,
"topBarNoBackground": topBarNoBackground, "topBarNoBackground": topBarNoBackground,
@@ -911,6 +914,11 @@ Singleton {
saveSettings() saveSettings()
} }
function setTopBarBottomGap(gap) {
topBarBottomGap = gap
saveSettings()
}
function setTopBarInnerPadding(padding) { function setTopBarInnerPadding(padding) {
topBarInnerPadding = padding topBarInnerPadding = padding
saveSettings() saveSettings()

View File

@@ -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 { Column {
width: parent.width width: parent.width
spacing: Theme.spacingS spacing: Theme.spacingS

View File

@@ -155,7 +155,7 @@ PanelWindow {
right: true 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 { mask: Region {
item: topBarMouseArea item: topBarMouseArea