mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-02 18:33:16 +02:00
setupscreen layouted properly
This commit is contained in:
@@ -63,8 +63,6 @@ PathView {
|
||||
opacity: parent.itemOpacity
|
||||
z: coverView.width - x
|
||||
|
||||
property int _origX
|
||||
property int _origY
|
||||
property int _origZ
|
||||
|
||||
onPlayClicked: {
|
||||
@@ -78,8 +76,6 @@ PathView {
|
||||
|
||||
onContainsMouseChanged: {
|
||||
if (containsMouse) {
|
||||
_origX = x;
|
||||
_origY = y;
|
||||
_origZ = z;
|
||||
coverView.itemHovered = true
|
||||
} else {
|
||||
|
@@ -48,18 +48,20 @@ Rectangle {
|
||||
id: stationVisualModel
|
||||
|
||||
|
||||
Column {
|
||||
Item {
|
||||
height: scene.height
|
||||
width: scene.width
|
||||
|
||||
Row {
|
||||
height: scene.height / 2
|
||||
width: scene.width
|
||||
Grid {
|
||||
anchors.fill: parent
|
||||
anchors.margins: spacing
|
||||
spacing: width * .1
|
||||
columns: 3
|
||||
|
||||
property int rowHeight: height / 2
|
||||
|
||||
Item {
|
||||
height: parent.height
|
||||
width: (parent.width - orText.width - parent.spacing * 2 ) * 2 / 3
|
||||
height: parent.rowHeight
|
||||
width: parent.width / 2
|
||||
GridView {
|
||||
id: gridView
|
||||
anchors.fill: parent
|
||||
@@ -85,18 +87,31 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
height: parent.rowHeight
|
||||
width: orText.width
|
||||
Text {
|
||||
id: orText
|
||||
anchors.centerIn: parent
|
||||
text: "or"
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
Item {
|
||||
height: parent.rowHeight
|
||||
width: parent.width / 4
|
||||
InputField {
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
height: scene.height / 2
|
||||
width: scene.width * .9
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: width * .1
|
||||
Item {
|
||||
height: parent.rowHeight
|
||||
width: parent.width / 2
|
||||
|
||||
TagCloud {
|
||||
height: parent.height
|
||||
width: (parent.width - orText.width - parent.spacing * 2 ) * 2 / 3
|
||||
anchors.fill: parent
|
||||
model: styleModel//generator.styles()
|
||||
opacity: echonestStation.configured ? 0 : 1
|
||||
|
||||
@@ -109,15 +124,23 @@ Rectangle {
|
||||
NumberAnimation { duration: 300 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Item {
|
||||
height: parent.rowHeight
|
||||
width: orText.width
|
||||
Text {
|
||||
id: orText
|
||||
text: "or"
|
||||
color: "white"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
Item {
|
||||
height: parent.rowHeight
|
||||
width: parent.width / 4
|
||||
InputField {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: (parent.width - orText.width - parent.spacing * 2 ) * 1 / 3
|
||||
anchors.centerIn: parent
|
||||
width: parent.width
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,17 +149,8 @@ Rectangle {
|
||||
coverSize: Math.min(scene.height, scene.width) / 2
|
||||
height: scene.height
|
||||
width: scene.width
|
||||
|
||||
onConfigure: stationListView.incrementCurrentIndex();
|
||||
}
|
||||
|
||||
|
||||
StationConfig {
|
||||
height: scene.height
|
||||
width: scene.width
|
||||
|
||||
onDone: stationListView.decrementCurrentIndex();
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
|
@@ -6,9 +6,6 @@ Item {
|
||||
id: root
|
||||
property int coverSize
|
||||
|
||||
signal configure()
|
||||
|
||||
|
||||
Item {
|
||||
anchors { top: parent.top; left: parent.left; bottom: parent.bottom }
|
||||
anchors.margins: 50
|
||||
@@ -89,15 +86,5 @@ Item {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Button {
|
||||
id: configureButton
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 20
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
text: "configure"
|
||||
onClicked: root.configure();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -30,18 +30,45 @@ Item {
|
||||
scale: itemScale
|
||||
Text {
|
||||
id: delegateText
|
||||
color: "white"
|
||||
color: "gray"
|
||||
//text: controlModel.controlAt( index ).summary
|
||||
text: modelData
|
||||
font.pointSize: 16
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.verticalCenterOffset: tagCloud.randomNumber(0, 15)
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "hovered"; when: cloudItemMouseArea.containsMouse
|
||||
PropertyChanges {
|
||||
target: delegateText
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "*"
|
||||
to: "hovered"
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "hovered"
|
||||
to: "*"
|
||||
ColorAnimation {
|
||||
duration: 1000
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
MouseArea {
|
||||
id: cloudItemMouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
onClicked: tagCloud.tagClicked( modelData )
|
||||
|
||||
}
|
||||
|
||||
Behavior on scale {
|
||||
|
Reference in New Issue
Block a user