On Sunday 19 June 2016, Dirk Hohndel wrote: > Hi Marco, > > The latest Kirigami causes two problems for Subsurface-mobile >
ha! i know what it is: the ScrollablePage component only finds the flickable it's supposed to scroll if its either its only or last child, due to how default qml properties work, so due to the label that was declared after the listviewit was getting lost (as the mainItem property now was the label) Is quite a quirk but i maintained this "mainItem" api in many places as is consistent with Qt 5.7 QQuickControls2 attached patch fixes it -- Marco Martin
From 0b32ea344d13a3b8ebc2f330ebdaae311c406b92 Mon Sep 17 00:00:00 2001 From: Marco Martin <[email protected]> Date: Tue, 21 Jun 2016 16:53:00 +0200 Subject: [PATCH] make sure the ListView is the last element since the contentItem is the default property of ScrollablePage, putting another Item after it will change contentItem with that one, in this case the Label Signed-off-by: Marco Martin <[email protected]> --- mobile-widgets/qml/DiveList.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index e405bcb..cb94e79d 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -244,6 +244,11 @@ Kirigami.ScrollablePage { } } + Kirigami.Label { + text: qsTr("No dives in dive list") + visible: diveListView.visible && diveListView.count === 0 + } + ListView { id: diveListView anchors.fill: parent @@ -273,11 +278,6 @@ Kirigami.ScrollablePage { } } - Kirigami.Label { - text: qsTr("No dives in dive list") - visible: diveListView.visible && diveListView.count === 0 - } - property QtObject addDiveAction: Action { iconName: "list-add" onTriggered: { -- 2.1.2
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
