This repository has been archived on 2024-06-03. You can view files and clone it, but cannot push or open issues or pull requests.
shared-libraries/ScStwStyling/resources/qml/lib/ScStwQmlComponents/BusyIndicator.qml
Dorian Zedler bd52819a96
- moved some stuff
- added qml module for shared components
2020-05-22 18:23:35 +02:00

65 lines
1.5 KiB
QML

import QtQuick 2.3
import QtQuick.Controls 2.4
import QtQuick.Controls.Styles 1.2
BusyIndicator {
id: control
property double animationSpeed: 1000
property double formFactor: 4.5
property color lineColor: "#21be2b"
contentItem: Item {
implicitWidth: 64
implicitHeight: 64
Item {
id: item
anchors.fill: parent
property int currentHeight: 0
SequentialAnimation {
running: control.running
loops: Animation.Infinite
NumberAnimation {
target: item
property: "currentHeight"
from: 0
to: 800
duration: control.animationSpeed
}
}
Row {
anchors.fill: parent
spacing: item.width / 9
Repeater {
id: repeater
model: 5
Rectangle {
property double heightMultiplier: Math.abs( Math.sin( ( ((item.currentHeight/100) + (index*(control.formFactor/repeater.model)))) * (Math.PI/8) ) )
anchors.verticalCenter: parent.verticalCenter
width: item.width / 9
height: ( heightMultiplier ) * ( item.height - 1 ) + 1
radius: width * 0.5
color: control.lineColor
}
}
}
}
}
}