QML UI: improve preferences layout

And make it resolution independent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-07-12 10:55:45 -07:00
parent ac074bf239
commit 57e9784d27

View file

@ -16,20 +16,15 @@ Window {
flags: Qt.Dialog flags: Qt.Dialog
modality: Qt.WindowModal modality: Qt.WindowModal
width: 400
height: 160
minimumHeight: 160
minimumWidth: 400
title: "Enter your Subsurface cloud credentials"
GridLayout { GridLayout {
columns: 2 columns: 2
anchors.fill: parent anchors.centerIn: parent
anchors.margins: 10 width: parent.width
rowSpacing: 10
columnSpacing: 10 Label {
text: "Enter your Subsurface cloud credentials"
Layout.columnSpan: 2
}
Label { Label {
text: "Email Address:" text: "Email Address:"
@ -61,19 +56,8 @@ Window {
} }
Item { Item {
Layout.columnSpan: 2 height: childrenRect.height
Layout.fillWidth: true width: childrenRect.width
implicitHeight: saveButton.height
Button {
id: cancelButton
text: "Cancel"
onClicked: {
loginWindow.close();
}
}
Button { Button {
id: saveButton id: saveButton
text: "Save" text: "Save"
@ -87,5 +71,18 @@ Window {
} }
} }
} }
Item {
height: childrenRect.height
width: childrenRect.width
Button {
id: cancelButton
text: "Cancel"
onClicked: {
loginWindow.close();
}
}
}
} }
} }