summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2014-09-11 12:04:20 +0200
committerGatis Paeglis <gatis.paeglis@digia.com>2014-09-12 15:49:21 +0300
commit3e1fd751c137d94b93efc138dd094de2b1089586 (patch)
tree459b3cd0f368c0da0f4faba2c26c7d20c56b28aa
parent5632bf93ca885f067a1d9bb9d8fef67d2a346129 (diff)
Use all available screen space for flicking
Task-number: QTEE-764 Change-Id: I8656cdfa6f99b31351c0d204f9a6725f38e1431b Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
-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;