Use new HCircleProgressBar for HBusyIndicator
This commit is contained in:
@@ -2,26 +2,7 @@ import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Shapes 1.12
|
||||
|
||||
BusyIndicator {
|
||||
id: indicator
|
||||
implicitWidth: theme ? theme.controls.loader.defaultDimension : 96
|
||||
implicitHeight: implicitWidth
|
||||
|
||||
contentItem: HIcon {
|
||||
svgName: "loader"
|
||||
dimension: indicator.width
|
||||
property var pr: dimension
|
||||
colorize: theme ? theme.controls.loader.colorize : "white"
|
||||
mipmap: true
|
||||
|
||||
RotationAnimation on rotation {
|
||||
id: rotationAnimation
|
||||
from: 0
|
||||
to: 360
|
||||
running: true
|
||||
loops: Animation.Infinite
|
||||
duration: theme ? (theme.animationDuration * 6) : 600
|
||||
easing.type: Easing.Linear
|
||||
}
|
||||
}
|
||||
HCircleProgressBar {
|
||||
indeterminate: true
|
||||
dialWidth: 2
|
||||
}
|
||||
|
@@ -15,19 +15,22 @@ RadialBar {
|
||||
|
||||
showText: true
|
||||
suffixText: qsTr("%")
|
||||
textFont.pixelSize: theme.fontSize.big
|
||||
textColor: theme.controls.circleProgressBar.text
|
||||
textFont.pixelSize: theme ? theme.fontSize.big : 22
|
||||
textColor: theme ? theme.controls.circleProgressBar.text : "white"
|
||||
|
||||
|
||||
property alias from: bar.minValue
|
||||
property alias to: bar.maxValue
|
||||
property bool indeterminate: false
|
||||
|
||||
property real indeterminateSpan:
|
||||
theme.controls.circleProgressBar.indeterminateSpan
|
||||
|
||||
|
||||
Binding {
|
||||
target: bar;
|
||||
property: "value";
|
||||
value: bar.to * theme.controls.circleProgressBar.indeterminateSpan
|
||||
value: bar.to * bar.indeterminateSpan
|
||||
when: bar.indeterminate
|
||||
}
|
||||
|
||||
@@ -38,6 +41,13 @@ RadialBar {
|
||||
when: bar.indeterminate
|
||||
}
|
||||
|
||||
Binding {
|
||||
target: bar
|
||||
property: "suffixText"
|
||||
value: ""
|
||||
when: bar.indeterminate
|
||||
}
|
||||
|
||||
RotationAnimator on rotation {
|
||||
running: bar.indeterminate
|
||||
from: 0
|
||||
|
@@ -46,6 +46,8 @@ HPage {
|
||||
HLoader {
|
||||
source: ready ? "ChatSplitView.qml" : "../Base/HBusyIndicator.qml"
|
||||
|
||||
Layout.preferredWidth: ready ? -1 : 96
|
||||
Layout.preferredHeight: Layout.preferredWidth
|
||||
Layout.fillWidth: ready
|
||||
Layout.fillHeight: ready
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
@@ -18,5 +18,9 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
width: Math.min(160, parent.width - 16, parent.height - 16)
|
||||
height: width
|
||||
indeterminateSpan: 0.5
|
||||
|
||||
foregroundColor: Qt.hsla(0, 0, 1, 0.15)
|
||||
progressColor: Qt.hsla(0, 0, 1, 0.4)
|
||||
}
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ HPage {
|
||||
|
||||
HLoader {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
width: ready ? parent.width : 96
|
||||
source: ready ?
|
||||
modelData :
|
||||
(modelData == "Profile.qml" ?
|
||||
|
Reference in New Issue
Block a user