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