1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-06 05:25:41 -05:00

feat: Long Live the DankBar > Top/Bottom positioning

This commit is contained in:
purian23
2025-09-26 23:45:19 -04:00
parent 4c6182b79c
commit 977043ac92
48 changed files with 1111 additions and 561 deletions

View File

@@ -36,7 +36,7 @@ DankPopout {
popupWidth: 400
popupHeight: contentLoader.item ? contentLoader.item.implicitHeight : 400
triggerX: Screen.width - 400 - Theme.spacingL
triggerY: Theme.barHeight - 4 + SettingsData.topBarSpacing + Theme.popupDistance
triggerY: Theme.barHeight - 4 + SettingsData.dankBarSpacing + Theme.popupDistance
triggerWidth: 40
positioning: "center"
screen: triggerScreen

View File

@@ -76,7 +76,13 @@ PanelWindow {
color: "transparent"
implicitWidth: 400
implicitHeight: 122
onScreenYChanged: margins.top = Theme.barHeight - 4 + SettingsData.topBarSpacing + 4 + screenY
onScreenYChanged: {
if (SettingsData.dankBarAtBottom) {
margins.bottom = Theme.barHeight - 4 + SettingsData.dankBarSpacing + 4 + screenY
} else {
margins.top = Theme.barHeight - 4 + SettingsData.dankBarSpacing + 4 + screenY
}
}
onHasValidDataChanged: {
if (!hasValidData && !exiting && !_isDestroying) {
forceExit()
@@ -109,12 +115,14 @@ PanelWindow {
}
anchors {
top: true
top: !SettingsData.dankBarAtBottom
bottom: SettingsData.dankBarAtBottom
right: true
}
margins {
top: Theme.barHeight - 4 + SettingsData.topBarSpacing + 4
top: SettingsData.dankBarAtBottom ? 0 : (Theme.barHeight - 4 + SettingsData.dankBarSpacing + 4)
bottom: SettingsData.dankBarAtBottom ? (Theme.barHeight - 4 + SettingsData.dankBarSpacing + 4) : 0
right: 12
}