diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
| commit | 3462bcc46ecf74f576ea4397f16492c16bd75b10 (patch) | |
| tree | c5ab7aef4498647e057bda8d49c11e5f9dda74c9 /raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/AppsDockOverflowButton.qml | |
| parent | 56616f693b4f263cbf0d47da43b67424efa6022d (diff) | |
| download | RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.tar.gz RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.zip | |
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/AppsDockOverflowButton.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/AppsDockOverflowButton.qml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/AppsDockOverflowButton.qml b/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/AppsDockOverflowButton.qml new file mode 100644 index 0000000..82c78d0 --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/Modules/DankBar/Widgets/AppsDockOverflowButton.qml @@ -0,0 +1,76 @@ +import QtQuick +import qs.Common +import qs.Widgets + +Item { + id: root + + property real iconSize: 24 + property int overflowCount: 0 + property bool overflowExpanded: false + property bool isVertical: false + property bool showBadge: true + + signal clicked + + Rectangle { + id: buttonBackground + anchors.centerIn: parent + width: root.iconSize + height: root.iconSize + radius: Theme.cornerRadius + color: Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, mouseArea.containsMouse ? 0.2 : 0.1) + + Behavior on color { + ColorAnimation { + duration: Theme.shortDuration + } + } + + DankIcon { + id: arrowIcon + anchors.centerIn: parent + size: root.iconSize * 0.6 + name: "expand_more" + color: Theme.widgetIconColor + rotation: isVertical ? (overflowExpanded ? 180 : 0) : (overflowExpanded ? 90 : -90) + + Behavior on rotation { + NumberAnimation { + duration: Theme.shortDuration + easing.type: Easing.OutCubic + } + } + } + } + + Rectangle { + visible: overflowCount > 0 && !overflowExpanded && root.showBadge + anchors.right: buttonBackground.right + anchors.top: buttonBackground.top + anchors.rightMargin: -4 + anchors.topMargin: -4 + width: Math.max(18, badgeText.width + 8) + height: 18 + radius: 9 + color: Theme.primary + z: 10 + + StyledText { + id: badgeText + anchors.centerIn: parent + text: `+${overflowCount}` + font.pixelSize: Theme.fontSizeSmall + font.weight: Font.Bold + color: Theme.onPrimary + } + } + + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: root.clicked() + } +} |