aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-27 09:55:18 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-27 09:55:18 -0700
commit16c6ff008916c81c2b72d54fb7993b78ed590617 (patch)
treedd72af5e4dc9b4c11cfa34a95a74c5b87837b789 /qt-mobile
parent32e5a8d29ae9343d8cd265e42cefa01dde92e3cb (diff)
downloadsubsurface-16c6ff008916c81c2b72d54fb7993b78ed590617.tar.gz
QML UI: consistent title and attempt of back button for dive details
The back arrow looks terrible. I'm not clear on how this is supposed to be implemented. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/DiveDetails.qml53
1 files changed, 40 insertions, 13 deletions
diff --git a/qt-mobile/DiveDetails.qml b/qt-mobile/DiveDetails.qml
index 5dfefdff8..5f25d817d 100644
--- a/qt-mobile/DiveDetails.qml
+++ b/qt-mobile/DiveDetails.qml
@@ -1,5 +1,6 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
+import QtQuick.Controls.Styles 1.2
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
@@ -31,22 +32,48 @@ Item {
clip: true
ColumnLayout {
width: parent.width
- RowLayout {
- Button {
- text: "Back"
- onClicked: {
- manager.commitChanges(
- dive_id,
- suit,
- buddy,
- divemaster,
- notes
- )
- stackView.pop();
+ Rectangle {
+ id: topBar
+ color: "#2C4882"
+ Layout.fillWidth: true
+ Layout.margins: 0
+ height: backButton.height * 1.2
+ RowLayout {
+ Button {
+ id: backButton
+ Layout.margins: 0.1 * height
+ text: "\u2190"
+ style: ButtonStyle {
+ background: Rectangle {
+ color: "#4C68A2"
+ }
+ label: Text {
+ id: txt
+ color: "white"
+ font.pointSize: 24
+ font.bold: true
+ text: control.text
+ }
+ }
+ onClicked: {
+ manager.commitChanges(
+ dive_id,
+ suit,
+ buddy,
+ divemaster,
+ notes
+ )
+ stackView.pop();
+ }
+ }
+ Text {
+ text: qsTr("Subsurface mobile")
+ font.pointSize: 18
+ font.bold: true
+ color: "white"
}
}
}
-
GridLayout {
id: editorDetails
width: parent.width