1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-01 01:51:58 +02:00

some more improvements in the stationview and the busyindicator

This commit is contained in:
Michael Zanetti
2012-12-20 00:34:56 +01:00
parent dde7501162
commit db82e18469
2 changed files with 42 additions and 2 deletions

View File

@@ -67,7 +67,10 @@ Rectangle {
CoverFlip {
id: coverView
anchors.fill: parent
anchors.right: parent.right
anchors.top: parent.top
height: parent.height
width: parent.width
interactive: false
backgroundColor: scene.color
@@ -83,6 +86,39 @@ Rectangle {
mainView.playItem(index)
}
states: [
State {
name: "empty"; when: mainView.loading
PropertyChanges {
target: coverView
anchors.rightMargin: -coverView.width
anchors.topMargin: - coverView.height
scale: 0
}
}
]
transitions: [
Transition {
from: "empty"
to: "*"
NumberAnimation {
properties: "anchors.topMargin,anchors.rightMargin,scale"
duration: 1000
easing.type: Easing.OutQuad
}
}
]
// Behavior on anchors.topMargin {
// NumberAnimation { duration: 500 }
// }
// Behavior on anchors.rightMargin {
// NumberAnimation { duration: 500 }
// }
// Behavior on scale {
// NumberAnimation { duration: 500 }
// }
}
BusyIndicator {
id: busyIndicator
@@ -90,7 +126,7 @@ Rectangle {
height: defaultFontHeight * 4
width: height
visible: mainView.loading
opacity: mainView.loading ? 1 : 0
running: mainView.loading
}

View File

@@ -12,6 +12,10 @@ Item {
property bool running: true
property int interval: 200
Behavior on opacity {
NumberAnimation { duration: 500 }
}
Repeater {
model: busyIndicator.count