QML UI: start making things resolution independent

Don't hard code sizes as devices tend to have much higher pixel density
than desktop computers. Instead make sizes relative to the content.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-07-12 10:52:44 -07:00
parent 4088f9f652
commit ac074bf239

View file

@ -17,7 +17,7 @@ Rectangle {
property real detailsOpacity : 0 property real detailsOpacity : 0
width: diveListView.width width: diveListView.width
height: 70 height: childrenRect.height
//Bounded rect for the background //Bounded rect for the background
Rectangle { Rectangle {
@ -38,11 +38,11 @@ Rectangle {
//And other details at the bottom. //And other details at the bottom.
Row { Row {
id: topLayout id: topLayout
x: 10; y: 10; height: 60; width: parent.width x: 10; y: 10; height: childrenRect.height; width: parent.width
spacing: 10 spacing: 10
Column { Column {
width: background.width; height: 60 width: background.width; height: childrenRect.height * 1.1
spacing: 5 spacing: 5
Text { Text {