From fc746c212919ccf2835ced673b97d5dfb501e0f6 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Thu, 30 Jul 2015 10:17:22 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-mobile/DiveDetails.qml | 15 ++++++++------- qt-mobile/main.qml | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/qt-mobile/DiveDetails.qml b/qt-mobile/DiveDetails.qml index e8bcedaaa..3c5120a85 100644 --- a/qt-mobile/DiveDetails.qml +++ b/qt-mobile/DiveDetails.qml @@ -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 { diff --git a/qt-mobile/main.qml b/qt-mobile/main.qml index 63ff5b5b4..24ebb40ed 100644 --- a/qt-mobile/main.qml +++ b/qt-mobile/main.qml @@ -81,6 +81,8 @@ ApplicationWindow { font.pointSize: 18 font.bold: true color: "white" + anchors.horizontalCenter: parent.horizontalCenter + horizontalAlignment: Text.AlignHCenter } Button { id: prefsButton -- cgit v1.2.3-70-g09d2