vertical bar

This commit is contained in:
end-4
2025-08-15 22:17:27 +07:00
parent 25a0c88670
commit 9fc0d26eb5
17 changed files with 1334 additions and 80 deletions
@@ -10,6 +10,7 @@ import Qt5Compat.GraphicalEffects
*/
ProgressBar {
id: root
property bool vertical: false
property real valueBarWidth: 30
property real valueBarHeight: 18
property color highlightColor: Appearance?.colors.colOnSecondaryContainer ?? "#685496"
@@ -45,13 +46,36 @@ ProgressBar {
visible: false
Rectangle {
id: progressFill
anchors {
left: parent.left
top: parent.top
bottom: parent.bottom
left: parent.left
right: undefined
}
radius: Appearance.rounding.unsharpen
width: parent.width * root.visualPosition
height: parent.height
states: State {
name: "vertical"
when: root.vertical
AnchorChanges {
target: progressFill
anchors {
top: undefined
bottom: parent.bottom
left: parent.left
right: parent.right
}
}
PropertyChanges {
target: progressFill
width: parent.width
height: parent.height * root.visualPosition
}
}
radius: Appearance.rounding.unsharpen
color: root.highlightColor
}
}