aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2017-12-09 02:14:33 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:02 +0100
commit0477af1b0d882acd241de67187bf28dfe4873809 (patch)
tree9b66fdf26d97653f03a14882b7a85f3eb57d4444
parent0b9e89691ddb799ef9a8d1bd6b8637809ecc3e1f (diff)
downloadmonzero-gui-0477af1b0d882acd241de67187bf28dfe4873809.tar.gz
monzero-gui-0477af1b0d882acd241de67187bf28dfe4873809.tar.xz
monzero-gui-0477af1b0d882acd241de67187bf28dfe4873809.zip
Settings - dropdown for log level
-rw-r--r--pages/Settings.qml79
1 files changed, 62 insertions, 17 deletions
diff --git a/pages/Settings.qml b/pages/Settings.qml
index c4213870..808edc5b 100644
--- a/pages/Settings.qml
+++ b/pages/Settings.qml
@@ -43,12 +43,19 @@ Rectangle {
color: "transparent"
- Clipboard { id: clipboard }
+ // fires on every page load
+ function onPageCompleted() {
+ console.log("Settings page loaded");
- function initSettings() {
- //runs on every page load
+ if(typeof daemonManager != "undefined"){
+ appWindow.daemonRunning = daemonManager.running(persistentSettings.testnet);
+ }
+
+ logLevelDropdown.update()
}
+ Clipboard { id: clipboard }
+
ColumnLayout {
id: mainLayout
anchors.margins: (isMobile)? 17 : 40
@@ -483,28 +490,66 @@ Rectangle {
}
}
- ColumnLayout {
- ComboBox {
- id: logLevel
- model: [0,1,2,3,4,"custom"]
- currentIndex : appWindow.persistentSettings.logLevel;
- onCurrentIndexChanged: {
- if (currentIndex == 5) {
- console.log("log categories changed: ", logCategories.text);
- walletManager.setLogCategories(logCategories.text);
- }
- else {
- console.log("log level changed: ",currentIndex);
- walletManager.setLogLevel(currentIndex);
+ GridLayout {
+ columns: (isMobile)? 1 : 3
+ Layout.fillWidth: true
+ columnSpacing: 32
+
+ ColumnLayout {
+ spacing: 0
+ Layout.fillWidth: true
+
+ ListModel {
+ id: logLevel
+ ListElement { name: "wow"; column1: "0"; }
+ ListElement { column1: "1"; }
+ ListElement { column1: "2"; }
+ ListElement { column1: "3"; }
+ ListElement { column1: "4"; }
+ ListElement { column1: "custom"; }
+ }
+
+ StandardDropdown {
+ id: logLevelDropdown
+ dataModel: logLevel
+ currentIndex: appWindow.persistentSettings.logLevel;
+ onChanged: {
+ if (currentIndex == 5) {
+ console.log("log categories changed: ", logCategories.text);
+ walletManager.setLogCategories(logCategories.text);
+ }
+ else {
+ console.log("log level changed: ",currentIndex);
+ walletManager.setLogLevel(currentIndex);
+ }
+ appWindow.persistentSettings.logLevel = currentIndex;
}
- appWindow.persistentSettings.logLevel = currentIndex;
+ Layout.fillWidth: true
+ shadowReleasedColor: "#FF4304"
+ shadowPressedColor: "#B32D00"
+ releasedColor: "#363636"
+ pressedColor: "#202020"
}
+ // Make sure dropdown is on top
+ z: parent.z + 30
}
+ ColumnLayout {
+ Layout.fillWidth: true
+ }
+
+ ColumnLayout {
+ Layout.fillWidth: true
+ }
+ }
+
+ ColumnLayout {
LineEdit {
id: logCategories
+ Layout.topMargin: 16 * scaleRatio
Layout.fillWidth: true
text: appWindow.persistentSettings.logCategories
+ labelText: "Log Categories"
placeholderText: qsTr("(e.g. *:WARNING,net.p2p:DEBUG)") + translationManager.emptyString
enabled: logLevel.currentIndex == 5
onEditingFinished: {