summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-06-09 19:01:49 -0400
committerJoseph Donofry <joedonofry@gmail.com>2021-06-09 19:01:49 -0400
commit284ca27fdc188d32f7638282818e31b21b02cc17 (patch)
tree24661053286981c97ff77326646419e67a13fcf9
parentChange variable for running (diff)
downloadnheko-284ca27fdc188d32f7638282818e31b21b02cc17.tar.xz
Add nheko logo spinner to relevant places in UI
-rw-r--r--resources/qml/MessageView.qml9
-rw-r--r--resources/qml/RoomSettings.qml12
-rw-r--r--resources/qml/TimelineView.qml2
-rw-r--r--resources/qml/UserProfile.qml4
-rw-r--r--resources/qml/device-verification/AwaitingVerificationConfirmation.qml4
-rw-r--r--resources/qml/device-verification/Waiting.qml5
-rw-r--r--resources/qml/ui/EmojiEmitter.qml60
7 files changed, 85 insertions, 11 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml

index 176905db..a3a80b93 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml
@@ -4,6 +4,8 @@ import "./delegates" import "./emoji" +import "./ui" + import Qt.labs.platform 1.1 as Platform import QtGraphicalEffects 1.0 import QtQuick 2.12 @@ -404,14 +406,13 @@ ScrollView { } - footer: BusyIndicator { + footer: Spinner { anchors.horizontalCenter: parent.horizontalCenter running: chat.model && chat.model.paginationInProgress - height: 50 - width: 50 + foreground: Nheko.colors.mid + visible: chat.model && chat.model.paginationInProgress z: 3 } - } Platform.Menu { diff --git a/resources/qml/RoomSettings.qml b/resources/qml/RoomSettings.qml
index 1f7fe5de..b9830386 100644 --- a/resources/qml/RoomSettings.qml +++ b/resources/qml/RoomSettings.qml
@@ -2,6 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later +import "./ui" import Qt.labs.platform 1.1 as Platform import QtQuick 2.9 import QtQuick.Controls 2.3 @@ -49,10 +50,17 @@ ApplicationWindow { } } - BusyIndicator { + // BusyIndicator { + // Layout.alignment: Qt.AlignHCenter + // running: roomSettings.isLoading + // visible: roomSettings.isLoading + // } + + Spinner { Layout.alignment: Qt.AlignHCenter - running: roomSettings.isLoading visible: roomSettings.isLoading + foreground: Nheko.colors.mid + running: roomSettings.isLoading } Text { diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 2e267b8c..5e5eccab 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -34,7 +34,7 @@ Item { Spinner { visible: TimelineManager.isInitialSync anchors.centerIn: parent - foreground: timelineRoot.colors.mid + foreground: Nheko.colors.mid running: TimelineManager.isInitialSync // height is somewhat arbitrary here... don't set width because width scales w/ height height: parent.height / 16 diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml
index 21f34f15..826d3165 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml
@@ -3,6 +3,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later import "./device-verification" +import "./ui" import QtQuick 2.9 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 @@ -47,10 +48,11 @@ ApplicationWindow { onClicked: profile.isSelf ? profile.changeAvatar() : TimelineManager.openImageOverlay(profile.avatarUrl, "") } - BusyIndicator { + Spinner { Layout.alignment: Qt.AlignHCenter running: profile.isLoading visible: profile.isLoading + foreground: Nheko.colors.mid } Text { diff --git a/resources/qml/device-verification/AwaitingVerificationConfirmation.qml b/resources/qml/device-verification/AwaitingVerificationConfirmation.qml
index a6a7f027..91306140 100644 --- a/resources/qml/device-verification/AwaitingVerificationConfirmation.qml +++ b/resources/qml/device-verification/AwaitingVerificationConfirmation.qml
@@ -2,6 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later +import "../ui" import QtQuick 2.3 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.10 @@ -25,8 +26,9 @@ Pane { verticalAlignment: Text.AlignVCenter } - BusyIndicator { + Spinner { Layout.alignment: Qt.AlignHCenter + foreground: Nheko.colors.mid } RowLayout { diff --git a/resources/qml/device-verification/Waiting.qml b/resources/qml/device-verification/Waiting.qml
index c521503b..e1401a47 100644 --- a/resources/qml/device-verification/Waiting.qml +++ b/resources/qml/device-verification/Waiting.qml
@@ -2,6 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later +import "../ui" import QtQuick 2.3 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.10 @@ -34,9 +35,9 @@ Pane { verticalAlignment: Text.AlignVCenter } - BusyIndicator { + Spinner { Layout.alignment: Qt.AlignHCenter - palette: Nheko.colors + foreground: Nheko.colors.mid } RowLayout { diff --git a/resources/qml/ui/EmojiEmitter.qml b/resources/qml/ui/EmojiEmitter.qml new file mode 100644
index 00000000..953b0352 --- /dev/null +++ b/resources/qml/ui/EmojiEmitter.qml
@@ -0,0 +1,60 @@ +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: bg + + readonly property int velocity: 50 + + ParticleSystem { + id: particleSys + } + + Emitter { + id: particles + + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + width: parent.width + system: particleSys + emitRate: 10 + lifeSpan: (parent.height / bg.velocity) * 1000 //8000 + lifeSpanVariation: 1000 + maximumEmitted: 1000 + size: 5 + sizeVariation: 15 + + velocity: AngleDirection { + angle: 90 + angleVariation: 10 + magnitude: bg.velocity + } + + } + + ItemParticle { + id: particle + + system: particleSys + delegate: itemDelegate + } + + Component { + id: itemDelegate + + Item { + id: container + + x: bg.width / 2 + y: 0 + + Text { + anchors.fill: parent + text: "🎉" + } + + } + + } + +}