waffles: action center: volume menu

This commit is contained in:
end-4
2025-11-19 23:39:18 +01:00
parent bca177eed2
commit 5c8d824749
42 changed files with 680 additions and 129 deletions
@@ -5,41 +5,21 @@ import qs.modules.common
import qs.modules.common.functions
import qs.modules.waffle.looks
Button {
WButton {
id: root
property var altAction: () => {}
property var middleClickAction: () => {}
property color colBackground: ColorUtils.transparentize(Looks.colors.bg1)
property color colBackgroundHover: Looks.colors.bg1Hover
property color colBackgroundActive: Looks.colors.bg1Active
colBackground: ColorUtils.transparentize(Looks.colors.bg1)
colBackgroundHover: Looks.colors.bg1Hover
colBackgroundActive: Looks.colors.bg1Active
property color colBackgroundBorder
property color color
Layout.fillHeight: true
topInset: 4
bottomInset: 4
signal hoverTimedOut()
property bool shouldShowTooltip: false
property Timer hoverTimer: Timer {
id: hoverTimer
running: root.hovered
interval: 400
onTriggered: {
root.hoverTimedOut()
}
}
onHoverTimedOut: {
root.shouldShowTooltip = true
}
onHoveredChanged: {
if (!root.hovered) {
root.shouldShowTooltip = false
root.hoverTimer.stop()
}
}
colBackgroundBorder: ColorUtils.transparentize(Looks.colors.bg1Border, (root.checked || root.hovered) ? Looks.contentTransparency : 1)
color: {
if (root.down) {