From bce952615c68ad2bd752fa45d8093233ed3ba75a Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Fri, 28 Sep 2018 13:44:08 +0200 Subject: [PATCH] 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 --- mobile-widgets/qml/DiveList.qml | 12 ++++-------- 1 file 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 }