hefty: bar: time widget

This commit is contained in:
end-4
2026-02-06 23:38:05 +01:00
parent 74368ad25a
commit 74c012c930
9 changed files with 177 additions and 18 deletions
@@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound
import QtQuick
import qs.modules.common as C
Rectangle {
id: root
@@ -7,7 +8,7 @@ Rectangle {
property bool hover: false
property bool press: false
property bool drag: false
property color contentColor: Appearance.m3colors.m3onBackground
property color contentColor: C.Appearance.m3colors.m3onBackground
color: "transparent"
FadeLoader {
@@ -15,9 +16,12 @@ Rectangle {
anchors.fill: parent
shown: root.hover
sourceComponent: StateLayer {
radius: root.radius
state: StateLayer.State.Hover
color: root.contentColor
topLeftRadius: root.topLeftRadius
topRightRadius: root.topRightRadius
bottomLeftRadius: root.bottomLeftRadius
bottomRightRadius: root.bottomRightRadius
}
}
FadeLoader {
@@ -25,9 +29,12 @@ Rectangle {
anchors.fill: parent
shown: root.focus
sourceComponent: StateLayer {
radius: root.radius
state: StateLayer.State.Focus
color: root.contentColor
topLeftRadius: root.topLeftRadius
topRightRadius: root.topRightRadius
bottomLeftRadius: root.bottomLeftRadius
bottomRightRadius: root.bottomRightRadius
}
}
FadeLoader {
@@ -35,9 +42,12 @@ Rectangle {
anchors.fill: parent
shown: root.press
sourceComponent: StateLayer {
radius: root.radius
state: StateLayer.State.Press
color: root.contentColor
topLeftRadius: root.topLeftRadius
topRightRadius: root.topRightRadius
bottomLeftRadius: root.bottomLeftRadius
bottomRightRadius: root.bottomRightRadius
}
}
FadeLoader {
@@ -45,9 +55,12 @@ Rectangle {
anchors.fill: parent
shown: root.drag
sourceComponent: StateLayer {
radius: root.radius
state: StateLayer.State.Drag
color: root.contentColor
topLeftRadius: root.topLeftRadius
topRightRadius: root.topRightRadius
bottomLeftRadius: root.bottomLeftRadius
bottomRightRadius: root.bottomRightRadius
}
}
}