QML UI: move back button back to the left and center text

The top bars on the main page and dive details should be the same height
and keep the same layout.

[Dirk Hohndel: refactored Joakim's patch to work on top of what was
               already in master]

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Joakim Bygdell 2015-07-30 10:17:22 +02:00 committed by Dirk Hohndel
parent a09cfb8e98
commit fc746c2129
2 changed files with 10 additions and 7 deletions

View file

@ -49,18 +49,11 @@ Item {
anchors.leftMargin: prefsButton.height * 0.1
anchors.right: topBar.right
anchors.rightMargin: prefsButton.height * 0.1
Text {
text: qsTr("Subsurface mobile")
font.pointSize: 18
font.bold: true
color: "white"
}
Button {
id: backButton
Layout.maximumHeight: prefsButton.height
Layout.minimumHeight: prefsButton.height
Layout.preferredWidth: Screen.width * 0.1
anchors.right: parent.right
text: "\u2190"
style: ButtonStyle {
background: Rectangle {
@ -88,6 +81,14 @@ Item {
stackView.pop();
}
}
Text {
text: qsTr("Subsurface mobile")
font.pointSize: 18
font.bold: true
color: "white"
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
}
}
}
GridLayout {

View file

@ -81,6 +81,8 @@ ApplicationWindow {
font.pointSize: 18
font.bold: true
color: "white"
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
}
Button {
id: prefsButton