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

setupscreen layouted properly

This commit is contained in:
Michael Zanetti
2012-11-25 19:43:17 +01:00
parent 897984f2a1
commit 014f598dd2
4 changed files with 89 additions and 65 deletions

View File

@@ -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 {

View File

@@ -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,39 +87,60 @@ Rectangle {
}
}
}
}
Row {
height: scene.height / 2
width: scene.width * .9
anchors.horizontalCenter: parent.horizontalCenter
spacing: width * .1
TagCloud {
height: parent.height
width: (parent.width - orText.width - parent.spacing * 2 ) * 2 / 3
model: styleModel//generator.styles()
opacity: echonestStation.configured ? 0 : 1
onTagClicked: {
echonestStation.setMainControl( EchonestStation.StationTypeStyle, item );
stationListView.incrementCurrentIndex();
}
Behavior on opacity {
NumberAnimation { duration: 300 }
Item {
height: parent.rowHeight
width: orText.width
Text {
id: orText
anchors.centerIn: parent
text: "or"
color: "white"
}
}
Text {
id: orText
text: "or"
color: "white"
anchors.verticalCenter: parent.verticalCenter
Item {
height: parent.rowHeight
width: parent.width / 4
InputField {
anchors.centerIn: parent
width: parent.width
}
}
InputField {
anchors.verticalCenter: parent.verticalCenter
width: (parent.width - orText.width - parent.spacing * 2 ) * 1 / 3
Item {
height: parent.rowHeight
width: parent.width / 2
TagCloud {
anchors.fill: parent
model: styleModel//generator.styles()
opacity: echonestStation.configured ? 0 : 1
onTagClicked: {
echonestStation.setMainControl( EchonestStation.StationTypeStyle, item );
stationListView.incrementCurrentIndex();
}
Behavior on opacity {
NumberAnimation { duration: 300 }
}
}
}
Item {
height: parent.rowHeight
width: orText.width
Text {
text: "or"
color: "white"
anchors.verticalCenter: parent.verticalCenter
}
}
Item {
height: parent.rowHeight
width: parent.width / 4
InputField {
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 {

View File

@@ -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();
}
}

View File

@@ -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 {