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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2018-10-20 06:00:20 -04:00
parent 76e4826fbc
commit 00a80c0e08

View file

@ -373,9 +373,18 @@ Kirigami.ScrollablePage {
} }
Component { Component {
id: filterHeader 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 { RowLayout {
id: filterBar id: filterBar
enabled: rootItem.filterToggle
z: 5 //make sure it sits on top z: 5 //make sure it sits on top
states: [ states: [
State { State {
@ -403,6 +412,7 @@ Kirigami.ScrollablePage {
onVisibleChanged: numShown.text = diveModel.shown() onVisibleChanged: numShown.text = diveModel.shown()
Controls.TextField { Controls.TextField {
id: sitefilter id: sitefilter
z: 10
verticalAlignment: TextInput.AlignVCenter verticalAlignment: TextInput.AlignVCenter
Layout.fillWidth: true Layout.fillWidth: true
text: "" text: ""
@ -426,6 +436,7 @@ Kirigami.ScrollablePage {
} }
Controls.Label { Controls.Label {
id: numShown id: numShown
z: 10
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
// when this is first rendered, the model is still empty, so // when this is first rendered, the model is still empty, so
// instead of having a misleading 0 here, just don't show a count // instead of having a misleading 0 here, just don't show a count
@ -434,6 +445,7 @@ Kirigami.ScrollablePage {
} }
} }
} }
}
ListView { ListView {
id: diveListView id: diveListView