mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-30 01:00:13 +02:00
some more work on stations merged
This commit is contained in:
73
data/qml/stations/StationItem.qml
Normal file
73
data/qml/stations/StationItem.qml
Normal file
@@ -0,0 +1,73 @@
|
||||
import QtQuick 1.1
|
||||
import tomahawk 1.0
|
||||
import "../tomahawkimports"
|
||||
|
||||
Item {
|
||||
id: stationItem
|
||||
|
||||
CoverFlip {
|
||||
id: coverView
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
interactive: false
|
||||
|
||||
backgroundColor: scene.color
|
||||
|
||||
model: dynamicModel
|
||||
currentIndex: currentlyPlayedIndex
|
||||
|
||||
onItemPlayPauseClicked: {
|
||||
mainView.playItem(index)
|
||||
}
|
||||
|
||||
onItemClicked: {
|
||||
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
|
||||
anchors.centerIn: parent
|
||||
height: defaultFontHeight * 4
|
||||
width: height
|
||||
|
||||
opacity: mainView.loading ? 1 : 0
|
||||
running: mainView.loading
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user