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:
@@ -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
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,10 @@ Item {
|
||||
property bool running: true
|
||||
property int interval: 200
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 500 }
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: busyIndicator.count
|
||||
|
||||
|
Reference in New Issue
Block a user