diff --git a/qml/harbour-nextcloudnotes.qml b/qml/harbour-nextcloudnotes.qml
index 16bdd51..28d0b4d 100644
--- a/qml/harbour-nextcloudnotes.qml
+++ b/qml/harbour-nextcloudnotes.qml
@@ -17,6 +17,8 @@ ApplicationWindow
property int previewLineCount: value("previewLineCount", 4)
property string sortBy: value("sortBy", "date")
property bool showSeparator: value("showSeparator", false)
+ property bool useMonoFont: value("useMonoFont", false)
+ property bool useCapitalX: value("useCapitalX", false)
}
ConfigurationValue {
diff --git a/qml/pages/EditPage.qml b/qml/pages/EditPage.qml
index 30c28e2..9c53f15 100644
--- a/qml/pages/EditPage.qml
+++ b/qml/pages/EditPage.qml
@@ -51,6 +51,7 @@ Dialog {
width: parent.width
focus: true
text: note.content
+ font.family: appSettings.useMonoFont ? "DejaVu Sans Mono" : Theme.fontFamily // "Courier"
property int preTextLength: 0
property var listPrefixes: ["- ", "* ", "+ ", "- [ ] ", "- [x] ", "- [X] "]
onTextChanged: {
diff --git a/qml/pages/NotePage.qml b/qml/pages/NotePage.qml
index b7cdad9..8f66bc9 100644
--- a/qml/pages/NotePage.qml
+++ b/qml/pages/NotePage.qml
@@ -35,9 +35,6 @@ Dialog {
function parseContent() {
note = account.getNote(note.id, false)
- //modifiedDetail.value = new Date(note.modified * 1000).toLocaleString(Qt.locale(), Locale.ShortFormat)
- //favoriteDetail.value = note.favorite ? qsTr("yes") : qsTr("no")
- //categoryDetail.value = note.category
var convertedText = converter.makeHtml(note.content)
var occurence = -1
convertedText = convertedText.replace(/^
\[ \] (.*)<\/li>$/gm,
@@ -73,13 +70,11 @@ Dialog {
MenuItem {
text: qsTr("Delete")
enabled: account ? true : false
- //visible: appSettings.currentAccount >= 0
onClicked: remorse.execute("Deleting", function() { account.deleteNote(notey.id) } )
}
MenuItem {
text: enabled ? qsTr("Reload") : qsTr("Updating...")
enabled: account ? !account.busy : false
- //visible: appSettings.currentAccount >= 0
onClicked: account.getNote(note.id)
}
MenuLabel {
@@ -117,7 +112,7 @@ Dialog {
function(match, p1, offset, string) {
occurence++
if (occurence === parseInt(link.split('_')[1])) {
- return '- [x] ' + p1 }
+ return (appSettings.useCapitalX ? '- [X] ' : '- [x] ') + p1 }
else { return match }
} )
note.content = newContent
diff --git a/qml/pages/SettingsPage.qml b/qml/pages/SettingsPage.qml
index a1cab6d..f940056 100644
--- a/qml/pages/SettingsPage.qml
+++ b/qml/pages/SettingsPage.qml
@@ -95,6 +95,34 @@ Page {
}
}
+ SectionHeader {
+ text: qsTr("Synchronization")
+ }
+ ComboBox {
+ id: autoSyncComboBox
+ label: qsTr("Auto-Sync")
+ description: qsTr("Periodically pull notes from the server")
+ menu: ContextMenu {
+ Repeater {
+ id: autoSyncIntervalRepeater
+ model: [0, 3, 5, 10, 20, 30, 60, 120, 300, 600]
+ MenuItem {
+ text: modelData === 0 ?
+ qsTr("Disabled") : (qsTr("every") + " " +
+ (parseInt(modelData / 60) ?
+ (parseInt(modelData / 60) + " " + qsTr("Minutes")) :
+ (modelData + " " + qsTr("Seconds"))))
+ Component.onCompleted: {
+ if (modelData === appSettings.autoSyncInterval) {
+ autoSyncComboBox.currentIndex = index
+ }
+ }
+ }
+ }
+ }
+ onCurrentIndexChanged: appSettings.autoSyncInterval = autoSyncIntervalRepeater.model[currentIndex]
+ }
+
SectionHeader {
text: qsTr("Appearance")
}
@@ -140,31 +168,19 @@ Page {
}
SectionHeader {
- text: qsTr("Synchronization")
+ text: qsTr("Editing")
}
- ComboBox {
- id: autoSyncComboBox
- label: qsTr("Auto-Sync")
- description: qsTr("Periodically pull notes from the server")
- menu: ContextMenu {
- Repeater {
- id: autoSyncIntervalRepeater
- model: [0, 3, 5, 10, 20, 30, 60, 120, 300, 600]
- MenuItem {
- text: modelData === 0 ?
- qsTr("Disabled") : (qsTr("every") + " " +
- (parseInt(modelData / 60) ?
- (parseInt(modelData / 60) + " " + qsTr("Minutes")) :
- (modelData + " " + qsTr("Seconds"))))
- Component.onCompleted: {
- if (modelData === appSettings.autoSyncInterval) {
- autoSyncComboBox.currentIndex = index
- }
- }
- }
- }
- }
- onCurrentIndexChanged: appSettings.autoSyncInterval = autoSyncIntervalRepeater.model[currentIndex]
+ TextSwitch {
+ text: qsTr("Use monospaced font")
+ description: qsTr("Use a monospeced font to edit a note")
+ checked: appSettings.useMonoFont
+ onCheckedChanged: appSettings.useMonoFont = checked
+ }
+ TextSwitch {
+ text: qsTr("Use capital 'X' in checkboxes")
+ description: qsTr("For compatibility with other apps such as Joplin")
+ checked: appSettings.useCapitalX
+ onCheckedChanged: appSettings.useCapitalX = checked
}
}
diff --git a/rpm/harbour-nextcloudnotes.changes b/rpm/harbour-nextcloudnotes.changes
index 82ad54b..8b37032 100644
--- a/rpm/harbour-nextcloudnotes.changes
+++ b/rpm/harbour-nextcloudnotes.changes
@@ -14,6 +14,8 @@
* Tue Dec 04 2018 Scharel Clemens 0.1-6
- Bugfix: Adding notes is possible again
+- Added: Option for monospaced font
+- Added: Option for capital X in checkboxes
* Tue Dec 04 2018 Scharel Clemens 0.1-5
- Implemented auto prepend for list elements