Add nheko logo spinner to relevant places in UI

This commit is contained in:
Joseph Donofry 2021-06-09 19:01:49 -04:00
parent f859937b65
commit 284ca27fdc
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB
7 changed files with 85 additions and 11 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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: "🎉"
}
}
}
}