diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index 2e7d5f8..1805fc6 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -7,7 +7,7 @@ CoverBackground { icon.source: Theme.colorScheme === Theme.DarkOnLight ? "../img/nextcloud-logo-dark.png" : "../img/nextcloud-logo-light.png" icon.width: parent.width icon.fillMode: Image.PreserveAspectFit - text: qsTr("Notes") + text: appSettings.titleInCover ? appWindow.currentNoteTitle : qsTr("Notes") } CoverActionList { diff --git a/qml/harbour-nextcloudnotes.qml b/qml/harbour-nextcloudnotes.qml index 5fa1388..56b3711 100644 --- a/qml/harbour-nextcloudnotes.qml +++ b/qml/harbour-nextcloudnotes.qml @@ -7,6 +7,8 @@ ApplicationWindow { id: appWindow + property string currentNoteTitle: qsTr("Notes") + ConfigurationValue { id: accounts key: appSettings.path + "/accountIDs" @@ -24,6 +26,7 @@ ApplicationWindow property int previewLineCount: value("previewLineCount", 4) property string sortBy: value("sortBy", "date") property bool showSeparator: value("showSeparator", false) + property bool titleInCover: value("titleInCover", true) property bool useMonoFont: value("useMonoFont", false) property bool useCapitalX: value("useCapitalX", false) diff --git a/qml/pages/NotePage.qml b/qml/pages/NotePage.qml index f5cfe6e..78e70e2 100644 --- a/qml/pages/NotePage.qml +++ b/qml/pages/NotePage.qml @@ -22,6 +22,7 @@ Dialog { acceptDestinationProperties: { note: note } Component.onCompleted: { note = api.getNote(note.id) + appWindow.currentNoteTitle = note.title reloadContent() } Connections { diff --git a/qml/pages/SettingsPage.qml b/qml/pages/SettingsPage.qml index 4731755..6012e62 100644 --- a/qml/pages/SettingsPage.qml +++ b/qml/pages/SettingsPage.qml @@ -172,6 +172,12 @@ Page { checked: appSettings.showSeparator onCheckedChanged: appSettings.showSeparator = checked } + TextSwitch { + text: qsTr("Title in cover") + description: qsTr("Show title of current note in cover") + checked: appSettings.titleInCover + onCheckedChanged: appSettings.titleInCover = checked + } Slider { width: parent.width minimumValue: 0