From 00a80c0e0850af1210dcc6d55e5113537a845a53 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 20 Oct 2018 06:00:20 -0400 Subject: [PATCH] Mobile/filtering: add background rectangle for filter row We are still trying to ensure that the filter is indeed shown in front of the dive list. This is working when running on the desktop without the rectangle, but on Android this appears to be needed. Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/DiveList.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 5678ab103..a6afdd1b1 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -373,9 +373,18 @@ Kirigami.ScrollablePage { } Component { id: filterHeader + Rectangle { + id: filterRectangle + default property alias data: filterBar.data + implicitHeight: filterBar.implicitHeight + implicitWidth: filterBar.implicitWidth + height: filterBar.height + anchors.left: parent.left + anchors.right: parent.right + color: subsurfaceTheme.backgroundColor + enabled: rootItem.filterToggle RowLayout { id: filterBar - enabled: rootItem.filterToggle z: 5 //make sure it sits on top states: [ State { @@ -403,6 +412,7 @@ Kirigami.ScrollablePage { onVisibleChanged: numShown.text = diveModel.shown() Controls.TextField { id: sitefilter + z: 10 verticalAlignment: TextInput.AlignVCenter Layout.fillWidth: true text: "" @@ -426,6 +436,7 @@ Kirigami.ScrollablePage { } Controls.Label { id: numShown + z: 10 verticalAlignment: Text.AlignVCenter // when this is first rendered, the model is still empty, so // instead of having a misleading 0 here, just don't show a count @@ -433,6 +444,7 @@ Kirigami.ScrollablePage { text: "" } } + } } ListView {