summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-09-28 13:44:08 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-30 08:16:52 -0700
commitbce952615c68ad2bd752fa45d8093233ed3ba75a (patch)
treed3cb3350a5f85c74be0ba848184d487e41103fb6 /mobile-widgets
parent0422cd3662e8e890887f38c2a7e718195ebcb601 (diff)
downloadsubsurface-bce952615c68ad2bd752fa45d8093233ed3ba75a.tar.gz
QML UI, cleanup: do not use iconSizes for unrelated sizing
A very unimportant change, but found when looking through the code for places where size of icons where used. The one changed here has nothing to do with icon related placement of a string, so its replaced by a way more logical placement of the affected string. Simply center the "no dives in the dive list" for an empty logbook on the screen, instead of at some random place in the upper left corner. Like I said: very unimportant, but it just looks nicer in the UI. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveList.qml12
1 files changed, 4 insertions, 8 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index ce8b1edb5..54c746958 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -372,14 +372,10 @@ Kirigami.ScrollablePage {
}
}
- Text {
- // make sure this gets pushed far enough down so that it's not obscured by the page title
- // it would be nicer to use Controls.Label, but due to a QML bug that isn't possible with a
- // weird "component versioning" error
- // using this property means that we require Qt 5.6 / QtQuick2.6
- topPadding: Kirigami.Units.iconSizes.large
- leftPadding: Kirigami.Units.iconSizes.large
-
+ Controls.Label {
+ anchors.fill: parent
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
text: qsTr("No dives in dive list")
visible: diveListView.visible && diveListView.count === 0
}