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>
This commit is contained in:
Dirk Hohndel 2018-10-19 21:15:00 -04:00
parent eedb1ce0ea
commit c0540d7682

View file

@ -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