init: working version
This commit is contained in:
commit
7d8d7dacae
109 changed files with 15066 additions and 0 deletions
82
custom/CustomBusyIndicator.qml
Normal file
82
custom/CustomBusyIndicator.qml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.config
|
||||
import qs.services
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Shapes
|
||||
|
||||
BusyIndicator {
|
||||
id: root
|
||||
|
||||
property color fg: Config.colors.primary
|
||||
property color bg: Config.colors.container
|
||||
|
||||
background: null
|
||||
|
||||
contentItem: Shape {
|
||||
id: shape
|
||||
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
asynchronous: true
|
||||
|
||||
RotationAnimator on rotation {
|
||||
from: 0
|
||||
to: 180
|
||||
running: root.visible && root.running
|
||||
loops: Animation.Infinite
|
||||
duration: Config.anim.durations.extraLarge
|
||||
easing.type: Easing.Linear
|
||||
easing.bezierCurve: Config.anim.curves.expressiveDefaultSpatial
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: Math.min(root.implicitWidth, root.implicitHeight) * 0.18
|
||||
strokeColor: root.bg
|
||||
fillColor: "transparent"
|
||||
capStyle: ShapePath.RoundCap
|
||||
|
||||
PathAngleArc {
|
||||
centerX: shape.width / 2
|
||||
centerY: shape.height / 2
|
||||
radiusX: root.implicitWidth / 2
|
||||
radiusY: root.implicitHeight / 2
|
||||
startAngle: 0
|
||||
sweepAngle: 360
|
||||
}
|
||||
|
||||
Behavior on strokeColor {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: Math.min(root.implicitWidth, root.implicitHeight) * 0.18
|
||||
strokeColor: root.fg
|
||||
fillColor: "transparent"
|
||||
capStyle: ShapePath.RoundCap
|
||||
|
||||
PathAngleArc {
|
||||
centerX: shape.width / 2
|
||||
centerY: shape.height / 2
|
||||
radiusX: root.implicitWidth / 2
|
||||
radiusY: root.implicitHeight / 2
|
||||
startAngle: -sweepAngle / 2
|
||||
sweepAngle: 60
|
||||
}
|
||||
|
||||
PathAngleArc {
|
||||
centerX: shape.width / 2
|
||||
centerY: shape.height / 2
|
||||
radiusX: root.implicitWidth / 2
|
||||
radiusY: root.implicitHeight / 2
|
||||
startAngle: 180 - sweepAngle / 2
|
||||
sweepAngle: 60
|
||||
}
|
||||
|
||||
Behavior on strokeColor {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue