summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-19 21:15:00 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-23 22:45:30 +0100
commitc0540d7682ebc7410791cefa489e3b16257f679c (patch)
tree28c4a0b63ab285e953947a971ad5c2e743754d70
parenteedb1ce0ea23b8e01f1dfe28d501d18fe0179006 (diff)
downloadsubsurface-c0540d7682ebc7410791cefa489e3b16257f679c.tar.gz
Mobile/filtering: add Settings options for filtering
Toggle case sensitive and whether or not to include the notes in full text search. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qml/Settings.qml51
1 files changed, 51 insertions, 0 deletions
diff --git a/mobile-widgets/qml/Settings.qml b/mobile-widgets/qml/Settings.qml
index 2b5e337f8..358d89a04 100644
--- a/mobile-widgets/qml/Settings.qml
+++ b/mobile-widgets/qml/Settings.qml
@@ -478,6 +478,57 @@ Kirigami.ScrollablePage {
opacity: 0.5
Layout.fillWidth: true
}
+ GridLayout {
+ id: filterPrefs
+ columns: 2
+
+ Controls.Label {
+ text: qsTr("Filter preferences")
+ font.pointSize: subsurfaceTheme.headingPointSize
+ font.weight: Font.Light
+ color: subsurfaceTheme.textColor
+ Layout.topMargin: Kirigami.Units.largeSpacing
+ Layout.bottomMargin: Kirigami.Units.largeSpacing / 2
+ Layout.columnSpan: 2
+ }
+ Controls.Label {
+ text: qsTr("Include notes in full text filtering")
+ font.pointSize: subsurfaceTheme.regularPointSize
+ Layout.preferredWidth: gridWidth * 0.75
+ }
+
+ SsrfSwitch {
+ id: fullTextNotes
+ checked: PrefGeneral.filterFullTextNotes
+ Layout.preferredWidth: gridWidth * 0.25
+ onClicked: {
+ PrefGeneral.set_filterFullTextNotes(checked)
+ }
+ }
+
+ Controls.Label {
+ text: qsTr("Match filter case sensitive")
+ font.pointSize: subsurfaceTheme.regularPointSize
+ Layout.preferredWidth: gridWidth * 0.75
+ }
+
+ SsrfSwitch {
+ id: filterCaseSensitive
+ checked: PrefGeneral.filterCaseSensitive
+ Layout.preferredWidth: gridWidth * 0.25
+ onClicked: {
+ PrefGeneral.set_filterCaseSensitive(checked)
+ }
+ }
+
+ }
+
+ Rectangle {
+ color: subsurfaceTheme.darkerPrimaryColor
+ height: 1
+ opacity: 0.5
+ Layout.fillWidth: true
+ }
GridLayout {
id: developer