8import QtQuick.Templates as T
9import org.kde.ksvg as KSvg
11import org.kde.plasma.core as PlasmaCore
12import org.kde.kirigami as Kirigami
17 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
18 implicitContentWidth + leftPadding + rightPadding)
19 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
20 implicitContentHeight + topPadding + bottomPadding)
26 imagePath: "widgets/bar_meter_horizontal"
28 colorSet: control.Kirigami.Theme.colorSet
32 implicitWidth:
Kirigami.Units.gridUnit * 8
33 implicitHeight: children[0].height
36 readonly
property real indeterminateWidth: Math.round(control.availableWidth / 4)
37 property real indeterminateProgress: 0
39 imagePath:
"widgets/bar_meter_horizontal"
42 LayoutMirroring.enabled: control.mirrored
43 anchors.left: parent.left
44 anchors.leftMargin: control.indeterminate ? indeterminateProgress * (control.availableWidth - indeterminateWidth) : 0
45 anchors.verticalCenter: parent.verticalCenter
48 width: control.indeterminate ? indeterminateWidth : Math.round(control.position * control.availableWidth)
49 height: barSvg.hasElement(
"hint-bar-size")
50 ? barSvg.elementSize(
"hint-bar-size").height
51 : fixedMargins.top + fixedMargins.bottom
53 visible: width >= fixedMargins.left + fixedMargins.right
55 SequentialAnimation on indeterminateProgress {
56 loops: Animation.Infinite
57 running: control.indeterminate && control.contentItem.visible
60 duration:
Kirigami.Units.humanMoment / 2
61 easing.type: Easing.InOutSine
65 duration:
Kirigami.Units.humanMoment / 2
66 easing.type: Easing.InOutSine
74 implicitWidth:
Kirigami.Units.gridUnit * 8
75 implicitHeight: children[0].height
78 imagePath:
"widgets/bar_meter_horizontal"
79 prefix:
"bar-inactive"
81 anchors.centerIn: parent
82 width: Math.max(parent.width, fixedMargins.left + fixedMargins.right)
83 height: barSvg.hasElement(
"hint-bar-size")
84 ? barSvg.elementSize(
"hint-bar-size").height
85 : fixedMargins.top + fixedMargins.bottom