2023-05-31 19:28:09 -04:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Controls.Basic
|
|
|
|
|
|
|
|
BusyIndicator {
|
|
|
|
id: control
|
|
|
|
|
|
|
|
contentItem: Item {
|
|
|
|
implicitWidth: 48
|
|
|
|
implicitHeight: 48
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: item
|
2023-06-01 17:23:45 -04:00
|
|
|
x: parent.width / 2 - width / 2
|
|
|
|
y: parent.height / 2 - height / 2
|
2023-05-31 19:28:09 -04:00
|
|
|
width: 48
|
|
|
|
height: 48
|
|
|
|
opacity: control.running ? 1 : 0
|
|
|
|
|
|
|
|
Behavior on opacity {
|
|
|
|
OpacityAnimator {
|
|
|
|
duration: 250
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RotationAnimator {
|
|
|
|
target: item
|
|
|
|
running: control.visible && control.running
|
|
|
|
from: 0
|
|
|
|
to: 360
|
|
|
|
loops: Animation.Infinite
|
|
|
|
duration: 1750
|
|
|
|
}
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
id: repeater
|
|
|
|
model: 6
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: delegate
|
|
|
|
x: item.width / 2 - width / 2
|
|
|
|
y: item.height / 2 - height / 2
|
|
|
|
implicitWidth: 10
|
|
|
|
implicitHeight: 10
|
|
|
|
radius: 5
|
2024-01-29 11:12:12 -05:00
|
|
|
color: theme.accentColor
|
2023-05-31 19:28:09 -04:00
|
|
|
|
|
|
|
required property int index
|
|
|
|
|
|
|
|
transform: [
|
|
|
|
Translate {
|
|
|
|
y: -Math.min(item.width, item.height) * 0.5 + 5
|
|
|
|
},
|
|
|
|
Rotation {
|
|
|
|
angle: delegate.index / repeater.count * 360
|
|
|
|
origin.x: 5
|
|
|
|
origin.y: 5
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|