mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Use the nheko spinner everywhere
This commit is contained in:
parent
f8285f165e
commit
a731402816
3 changed files with 4 additions and 72 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
import "./emoji"
|
import "./emoji"
|
||||||
import "./voip"
|
import "./voip"
|
||||||
|
import "./ui"
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
|
@ -90,8 +91,9 @@ Rectangle {
|
||||||
color: Nheko.colors.window
|
color: Nheko.colors.window
|
||||||
visible: room && room.input.uploading
|
visible: room && room.input.uploading
|
||||||
|
|
||||||
NhekoBusyIndicator {
|
Spinner {
|
||||||
anchors.fill: parent
|
anchors.centerIn: parent
|
||||||
|
height: parent.height / 2
|
||||||
running: parent.visible
|
running: parent.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -111,7 +111,6 @@
|
||||||
<file>qml/UploadBox.qml</file>
|
<file>qml/UploadBox.qml</file>
|
||||||
<file>qml/MessageInput.qml</file>
|
<file>qml/MessageInput.qml</file>
|
||||||
<file>qml/MessageView.qml</file>
|
<file>qml/MessageView.qml</file>
|
||||||
<file>qml/NhekoBusyIndicator.qml</file>
|
|
||||||
<file>qml/PrivacyScreen.qml</file>
|
<file>qml/PrivacyScreen.qml</file>
|
||||||
<file>qml/Reactions.qml</file>
|
<file>qml/Reactions.qml</file>
|
||||||
<file>qml/ReplyPopup.qml</file>
|
<file>qml/ReplyPopup.qml</file>
|
||||||
|
|
Loading…
Reference in a new issue