From c0540d7682ebc7410791cefa489e3b16257f679c Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 19 Oct 2018 21:15:00 -0400 Subject: 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 --- mobile-widgets/qml/Settings.qml | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'mobile-widgets') 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 @@ -472,6 +472,57 @@ Kirigami.ScrollablePage { } } + Rectangle { + color: subsurfaceTheme.darkerPrimaryColor + height: 1 + 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 -- cgit v1.2.3-70-g09d2