diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2023-02-25 11:03:30 -0500 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2023-02-28 20:40:22 -0500 |
commit | a7314028166498711d7e9c3925d5e991fb4f83d5 (patch) | |
tree | c1765eca244cb56cf3fd8704705ad3fe99918e9b /resources | |
parent | Translated using Weblate (Ukrainian) (diff) | |
download | nheko-a7314028166498711d7e9c3925d5e991fb4f83d5.tar.xz |
Use the nheko spinner everywhere
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/MessageInput.qml | 6 | ||||
-rw-r--r-- | resources/qml/NhekoBusyIndicator.qml | 69 | ||||
-rw-r--r-- | resources/res.qrc | 1 |
3 files changed, 4 insertions, 72 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index f31123e5..6029a31d 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -4,6 +4,7 @@ import "./emoji" import "./voip" +import "./ui" import QtQuick 2.12 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 @@ -90,8 +91,9 @@ Rectangle { color: Nheko.colors.window visible: room && room.input.uploading - NhekoBusyIndicator { - anchors.fill: parent + Spinner { + anchors.centerIn: parent + height: parent.height / 2 running: parent.visible } diff --git a/resources/qml/NhekoBusyIndicator.qml b/resources/qml/NhekoBusyIndicator.qml deleted file mode 100644 index f3d1e8a4..00000000 --- a/resources/qml/NhekoBusyIndicator.qml +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-FileCopyrightText: Nheko Contributors -// -// SPDX-License-Identifier: GPL-3.0-or-later - -import QtQuick 2.9 -import QtQuick.Controls 2.3 -import QtQuick.Layouts 1.2 -import im.nheko 1.0 - -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 / 8 - color: Nheko.colors.text - opacity: (index + 2) / (repeater.count + 2) - transform: [ - Translate { - y: item.height / 2 - }, - Rotation { - angle: index / repeater.count * 360 - origin.x: item.height / 2 - origin.y: item.height / 2 - } - ] - } - - } - - Behavior on opacity { - OpacityAnimator { - duration: 250 - } - - } - - } - - } - -} diff --git a/resources/res.qrc b/resources/res.qrc index 88159d40..9c7d0c87 100644 --- a/resources/res.qrc +++ b/resources/res.qrc @@ -111,7 +111,6 @@ <file>qml/UploadBox.qml</file> <file>qml/MessageInput.qml</file> <file>qml/MessageView.qml</file> - <file>qml/NhekoBusyIndicator.qml</file> <file>qml/PrivacyScreen.qml</file> <file>qml/Reactions.qml</file> <file>qml/ReplyPopup.qml</file> |