1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -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 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()

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

View File

@@ -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