summary refs log tree commit diff
path: root/resources/qml/NhekoBusyIndicator.qml
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2020-11-25 22:01:19 +0100
committerGitHub <noreply@github.com>2020-11-25 22:01:19 +0100
commitc44513614f00512326877f544a55680d18fef41c (patch)
tree6e89ae6e98928beb00a35e815b8fafbd7cd49a61 /resources/qml/NhekoBusyIndicator.qml
parentFix ActiveCallBar (diff)
parentMerge pull request #335 from Nheko-Reborn/qml-text-input (diff)
downloadnheko-c44513614f00512326877f544a55680d18fef41c.tar.xz
Merge branch 'master' into fix-call-bar
Diffstat (limited to 'resources/qml/NhekoBusyIndicator.qml')
-rw-r--r--resources/qml/NhekoBusyIndicator.qml64
1 files changed, 64 insertions, 0 deletions
diff --git a/resources/qml/NhekoBusyIndicator.qml b/resources/qml/NhekoBusyIndicator.qml
new file mode 100644

index 00000000..89a40dd5 --- /dev/null +++ b/resources/qml/NhekoBusyIndicator.qml
@@ -0,0 +1,64 @@ +import QtQuick 2.9 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.2 + +BusyIndicator { + id: control + + contentItem: Item { + implicitWidth: 64 + implicitHeight: 64 + + Item { + id: item + + height: Math.min(parent.height, parent.width) + width: height + opacity: control.running ? 1 : 0 + + RotationAnimator { + target: item + running: control.visible && control.running + from: 0 + to: 360 + loops: Animation.Infinite + duration: 2000 + } + + Repeater { + id: repeater + + model: 6 + + Rectangle { + implicitWidth: radius * 2 + implicitHeight: radius * 2 + radius: item.height / 6 + color: colors.text + opacity: (index + 2) / (repeater.count + 2) + transform: [ + Translate { + y: -Math.min(item.width, item.height) * 0.5 + item.height / 6 + }, + Rotation { + angle: index / repeater.count * 360 + origin.x: item.height / 2 + origin.y: item.height / 2 + } + ] + } + + } + + Behavior on opacity { + OpacityAnimator { + duration: 250 + } + + } + + } + + } + +}