mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 14:18:49 +03:00
Add nheko logo spinner to relevant places in UI
This commit is contained in:
parent
f859937b65
commit
284ca27fdc
7 changed files with 85 additions and 11 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
import "./delegates"
|
import "./delegates"
|
||||||
import "./emoji"
|
import "./emoji"
|
||||||
|
import "./ui"
|
||||||
|
|
||||||
import Qt.labs.platform 1.1 as Platform
|
import Qt.labs.platform 1.1 as Platform
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
|
@ -404,14 +406,13 @@ ScrollView {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: BusyIndicator {
|
footer: Spinner {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
running: chat.model && chat.model.paginationInProgress
|
running: chat.model && chat.model.paginationInProgress
|
||||||
height: 50
|
foreground: Nheko.colors.mid
|
||||||
width: 50
|
visible: chat.model && chat.model.paginationInProgress
|
||||||
z: 3
|
z: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Platform.Menu {
|
Platform.Menu {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import "./ui"
|
||||||
import Qt.labs.platform 1.1 as Platform
|
import Qt.labs.platform 1.1 as Platform
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
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
|
Layout.alignment: Qt.AlignHCenter
|
||||||
running: roomSettings.isLoading
|
|
||||||
visible: roomSettings.isLoading
|
visible: roomSettings.isLoading
|
||||||
|
foreground: Nheko.colors.mid
|
||||||
|
running: roomSettings.isLoading
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
|
@ -34,7 +34,7 @@ Item {
|
||||||
Spinner {
|
Spinner {
|
||||||
visible: TimelineManager.isInitialSync
|
visible: TimelineManager.isInitialSync
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
foreground: timelineRoot.colors.mid
|
foreground: Nheko.colors.mid
|
||||||
running: TimelineManager.isInitialSync
|
running: TimelineManager.isInitialSync
|
||||||
// height is somewhat arbitrary here... don't set width because width scales w/ height
|
// height is somewhat arbitrary here... don't set width because width scales w/ height
|
||||||
height: parent.height / 16
|
height: parent.height / 16
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import "./device-verification"
|
import "./device-verification"
|
||||||
|
import "./ui"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
|
@ -47,10 +48,11 @@ ApplicationWindow {
|
||||||
onClicked: profile.isSelf ? profile.changeAvatar() : TimelineManager.openImageOverlay(profile.avatarUrl, "")
|
onClicked: profile.isSelf ? profile.changeAvatar() : TimelineManager.openImageOverlay(profile.avatarUrl, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
Spinner {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
running: profile.isLoading
|
running: profile.isLoading
|
||||||
visible: profile.isLoading
|
visible: profile.isLoading
|
||||||
|
foreground: Nheko.colors.mid
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import "../ui"
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
|
@ -25,8 +26,9 @@ Pane {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
Spinner {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
foreground: Nheko.colors.mid
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import "../ui"
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
|
@ -34,9 +35,9 @@ Pane {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
BusyIndicator {
|
Spinner {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
palette: Nheko.colors
|
foreground: Nheko.colors.mid
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
60
resources/qml/ui/EmojiEmitter.qml
Normal file
60
resources/qml/ui/EmojiEmitter.qml
Normal 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: "🎉"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue