summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-20 06:02:15 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-23 22:45:30 +0100
commit6d77e66b69fd92610002ffaaae7846d3b57b30b5 (patch)
tree98d9738d20e6ffb4c6a26dfb29175b8e258584a3
parent00a80c0e0850af1210dcc6d55e5113537a845a53 (diff)
downloadsubsurface-6d77e66b69fd92610002ffaaae7846d3b57b30b5.tar.gz
Mobile/filtering: clean up whitespace from last commit
This one does nothing but whitespace - separating it into two commits makes the previous one a lot easier to read. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/DiveList.qml112
1 files changed, 56 insertions, 56 deletions
diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml
index a6afdd1b1..8fee0e9fe 100644
--- a/mobile-widgets/qml/DiveList.qml
+++ b/mobile-widgets/qml/DiveList.qml
@@ -383,67 +383,67 @@ Kirigami.ScrollablePage {
anchors.right: parent.right
color: subsurfaceTheme.backgroundColor
enabled: rootItem.filterToggle
- RowLayout {
- id: filterBar
- z: 5 //make sure it sits on top
- states: [
- State {
- name: "isVisible"
- when: rootItem.filterToggle
- PropertyChanges { target: filterBar; height: sitefilter.implicitHeight }
- },
- State {
- name: "isHidden"
- when: !rootItem.filterToggle
- PropertyChanges { target: filterBar; height: 0 }
- }
+ RowLayout {
+ id: filterBar
+ z: 5 //make sure it sits on top
+ states: [
+ State {
+ name: "isVisible"
+ when: rootItem.filterToggle
+ PropertyChanges { target: filterBar; height: sitefilter.implicitHeight }
+ },
+ State {
+ name: "isHidden"
+ when: !rootItem.filterToggle
+ PropertyChanges { target: filterBar; height: 0 }
+ }
- ]
- transitions: [
- Transition {
- NumberAnimation { property: "height"; duration: 400; easing.type: Easing.InOutQuad }
- }
- ]
+ ]
+ transitions: [
+ Transition {
+ NumberAnimation { property: "height"; duration: 400; easing.type: Easing.InOutQuad }
+ }
+ ]
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: Kirigami.Units.gridUnit / 2
- anchors.rightMargin: Kirigami.Units.gridUnit / 2
- onVisibleChanged: numShown.text = diveModel.shown()
- Controls.TextField {
- id: sitefilter
- z: 10
- verticalAlignment: TextInput.AlignVCenter
- Layout.fillWidth: true
- text: ""
- placeholderText: "Full text search"
- onAccepted: {
- showBusy = true
- console.log("show busy")
- rootItem.filterPattern = text
- diveModel.setFilter(text)
- console.log("back from setFilter")
- showBusy = false
- numShown.text = diveModel.shown()
- }
- onEnabledChanged: {
- // reset the filter when it gets toggled
- text = ""
- if (visible) {
- forceActiveFocus()
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.leftMargin: Kirigami.Units.gridUnit / 2
+ anchors.rightMargin: Kirigami.Units.gridUnit / 2
+ onVisibleChanged: numShown.text = diveModel.shown()
+ Controls.TextField {
+ id: sitefilter
+ z: 10
+ verticalAlignment: TextInput.AlignVCenter
+ Layout.fillWidth: true
+ text: ""
+ placeholderText: "Full text search"
+ onAccepted: {
+ showBusy = true
+ console.log("show busy")
+ rootItem.filterPattern = text
+ diveModel.setFilter(text)
+ console.log("back from setFilter")
+ showBusy = false
+ numShown.text = diveModel.shown()
+ }
+ onEnabledChanged: {
+ // reset the filter when it gets toggled
+ text = ""
+ if (visible) {
+ forceActiveFocus()
+ }
}
}
+ 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
+ // it gets set whenever visibility or the search text changes
+ text: ""
+ }
}
- 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
- // it gets set whenever visibility or the search text changes
- text: ""
- }
- }
}
}