summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qml/LaunchScreen.qml19
1 files changed, 8 insertions, 11 deletions
diff --git a/qml/LaunchScreen.qml b/qml/LaunchScreen.qml
index 371c12e..95988db 100644
--- a/qml/LaunchScreen.qml
+++ b/qml/LaunchScreen.qml
@@ -28,9 +28,10 @@ Item {
id: list
y: 10
width: parent.width
- height: parent.height / root.itemsPerScreen
+ height: parent.height
property real cellWidth: (list.width - (root.itemsPerScreen - 1) * list.spacing) / root.itemsPerScreen
+ property real cellHeight: (list.height / root.itemsPerScreen)
orientation: ListView.Horizontal
@@ -51,7 +52,7 @@ Item {
id: iconRoot;
width: list.cellWidth
- height: list.height
+ height: list.cellHeight
offset: list.contentX;
@@ -87,8 +88,10 @@ Item {
}
onMovementEnded: {
- var center = mapToItem(contentItem, width / 2, height / 2)
- itemAt(center.x, center.y).select()
+ var hCenter = mapToItem(contentItem, width / 2, engine.centimeter())
+ var demo = itemAt(hCenter.x, hCenter.y)
+ if (demo)
+ demo.select()
}
onCountChanged: if (count > 0 && currentIndex < 0) currentIndex = 0
@@ -107,11 +110,8 @@ Item {
font.pixelSize: engine.fontSize()
color: "white"
font.bold: true
-
anchors.horizontalCenter: parent.horizontalCenter;
- anchors.top: list.bottom
- anchors.topMargin: engine.centimeter() * 0.5
-
+ y: list.cellHeight + engine.centimeter() * 0.5
wrapMode: Text.WordWrap
}
@@ -119,19 +119,16 @@ Item {
id: descriptionLabel
font.pixelSize: engine.smallFontSize()
color: "white"
-
anchors.left: parent.left
anchors.right: logo.left
anchors.top: nameLabel.bottom
anchors.bottom: parent.bottom
anchors.margins: engine.centimeter();
-
wrapMode: Text.WordWrap
}
GlimmeringQtLogo {
id: logo
-
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.margins: width / 4;