1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-31 17:42:13 +02:00

some look and feel improvements

This commit is contained in:
Michael Zanetti
2012-12-20 00:02:11 +01:00
parent bf2ac533e0
commit dde7501162
6 changed files with 67 additions and 12 deletions

View File

@@ -84,21 +84,14 @@ Rectangle {
}
}
Image {
BusyIndicator {
id: busyIndicator
source: "../images/loading-animation.svg"
anchors.centerIn: parent
height: defaultFontHeight * 4
width: height
visible: mainView.loading
RotationAnimation {
target: busyIndicator
from: 0
to: 360
duration: 1500
running: true
loops: Animation.Infinite
}
running: mainView.loading
}
}

View File

@@ -0,0 +1,48 @@
import QtQuick 1.1
Item {
id: busyIndicator
width: 100
height: width
property int barWidth: width / 10
property int barHeight: height / 4
property int count: 12
property color color: "white"
property int currentHighlight: 0
property bool running: true
property int interval: 200
Repeater {
model: busyIndicator.count
Item {
height: parent.height
width: busyIndicator.barWidth
anchors.centerIn: parent
Rectangle {
anchors {
top: parent.top
left: parent.left
right: parent.right
}
height: busyIndicator.barHeight
radius: width / 2
color: busyIndicator.color
}
rotation: 360 / busyIndicator.count * index
opacity: 1 - ((index > busyIndicator.currentHighlight ? busyIndicator.currentHighlight + busyIndicator.count : busyIndicator.currentHighlight) - index) / busyIndicator.count
Behavior on opacity {
NumberAnimation { duration: busyIndicator.interval }
}
}
}
Timer {
interval: busyIndicator.interval
running: busyIndicator.running
repeat: true
onTriggered: parent.currentHighlight = (parent.currentHighlight + 1) % busyIndicator.count
}
}

View File

@@ -27,7 +27,7 @@ Item {
width: delegateText.width * 1.1
height: delegateText.height
property double itemScale: Math.random() + .3
scale: 1//itemScale
scale: itemScale
Text {
id: delegateText
color: "gray"