aboutsummaryrefslogtreecommitdiff
path: root/qml/SettingsPage.qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-10-02 23:30:45 +0000
committerlink2xt <link2xt@testrun.org>2021-10-02 23:30:45 +0000
commit2936a854df9f1a1202fda08cd71773a95c727603 (patch)
tree063e23801381e88d4b421884168c9e199166896c /qml/SettingsPage.qml
parent40092aa096bac7e279eb5a4cc97758bac484236c (diff)
downloadkdeltachat-2936a854df9f1a1202fda08cd71773a95c727603.tar.gz
kdeltachat-2936a854df9f1a1202fda08cd71773a95c727603.zip
Fix QML code style
Mostly qmlformat, also rename root "id"s.
Diffstat (limited to 'qml/SettingsPage.qml')
-rw-r--r--qml/SettingsPage.qml34
1 files changed, 22 insertions, 12 deletions
diff --git a/qml/SettingsPage.qml b/qml/SettingsPage.qml
index c171b53..138fe71 100644
--- a/qml/SettingsPage.qml
+++ b/qml/SettingsPage.qml
@@ -1,21 +1,19 @@
+import DeltaChat 1.0
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import org.kde.kirigami 2.12 as Kirigami
-import DeltaChat 1.0
-
Kirigami.ScrollablePage {
id: root
- title: "Settings"
-
required property DcContext context
+ title: "Settings"
+
Kirigami.FormLayout {
Image {
Kirigami.FormData.label: "Avatar: "
-
source: "file:" + root.context.getConfig("selfavatar")
}
@@ -29,7 +27,6 @@ Kirigami.ScrollablePage {
TextArea {
Kirigami.FormData.label: "Signature: "
-
text: root.context.getConfig("selfstatus")
onEditingFinished: root.context.setConfig("selfstatus", text)
selectByMouse: true
@@ -79,16 +76,27 @@ Kirigami.ScrollablePage {
ComboBox {
Kirigami.FormData.label: "Show classic emails: "
+ textRole: "text"
+ currentIndex: root.context.getConfig("show_emails")
+ onActivated: root.context.setConfig("show_emails", currentIndex)
model: ListModel {
id: certificateChecksModel
- ListElement { text: "No, chats only" }
- ListElement { text: "For accepted contacts" }
- ListElement { text: "All" }
+
+ ListElement {
+ text: "No, chats only"
+ }
+
+ ListElement {
+ text: "For accepted contacts"
+ }
+
+ ListElement {
+ text: "All"
+ }
+
}
- textRole: "text"
- currentIndex: root.context.getConfig("show_emails")
- onActivated: root.context.setConfig("show_emails", currentIndex)
+
}
Switch {
@@ -121,5 +129,7 @@ Kirigami.ScrollablePage {
text: settingsPageRoot.context.getConfig("socks5_password")
onEditingFinished: settingsPageRoot.context.setConfig("socks5_password", text)
}
+
}
+
}