1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-27 23:12:49 -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

@@ -0,0 +1,54 @@
import QtQuick
import qs.Common
import qs.Widgets
Rectangle {
id: root
property bool isActive: false
property string section: "right"
property var popupTarget: null
property var parentScreen: null
property real widgetHeight: 30
property real barHeight: 48
readonly property real horizontalPadding: SettingsData.dankBarNoBackground ? 0 : Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30))
signal clicked()
width: colorPickerIcon.width + horizontalPadding * 2
height: widgetHeight
radius: SettingsData.dankBarNoBackground ? 0 : Theme.cornerRadius
color: {
if (SettingsData.dankBarNoBackground) {
return "transparent";
}
const baseColor = colorPickerArea.containsMouse ? Theme.widgetBaseHoverColor : Theme.widgetBaseBackgroundColor;
return Qt.rgba(baseColor.r, baseColor.g, baseColor.b, baseColor.a * Theme.widgetTransparency);
}
DankIcon {
id: colorPickerIcon
anchors.centerIn: parent
name: "palette"
size: Theme.iconSize - 6
color: colorPickerArea.containsMouse || root.isActive ? Theme.primary : Theme.surfaceText
}
MouseArea {
id: colorPickerArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onPressed: {
console.log("Color picker button clicked!")
root.colorPickerRequested();
}
}
// Signal to notify TopBar to open color picker
signal colorPickerRequested()
}