From 1cacc8cf88a24fbdc66e436965858a815d448084 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 18 Jun 2020 08:03:11 -0400 Subject: [PATCH] support enabling/disabling tabs in the advanced settings support enabling/disabling tabs in the advanced settings use qstr --- ui/app/AppLayouts/Profile/LeftTab/Menu.qml | 3 +- .../Profile/Sections/AdvancedContainer.qml | 45 +++++++++++++++++++ ui/app/AppMain.qml | 10 +++-- 3 files changed, 52 insertions(+), 6 deletions(-) diff --git a/ui/app/AppLayouts/Profile/LeftTab/Menu.qml b/ui/app/AppLayouts/Profile/LeftTab/Menu.qml index 6df9ba306f..c85604ca9b 100644 --- a/ui/app/AppLayouts/Profile/LeftTab/Menu.qml +++ b/ui/app/AppLayouts/Profile/LeftTab/Menu.qml @@ -182,8 +182,7 @@ Rectangle { TabButton { id: advancedTabButton width: profileInfoContainer.w - height: 0 //profileTabBar.btnheight - visible: false + height: profileTabBar.btnheight text: "" anchors.left: parent.left anchors.leftMargin: 0 diff --git a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml index d19e4dac20..3e1b28074c 100644 --- a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml @@ -20,4 +20,49 @@ Item { font.weight: Font.Bold font.pixelSize: 20 } + + RowLayout { + id: browserTabSettings + anchors.top: element7.bottom + anchors.topMargin: 20 + anchors.left: parent.left + anchors.leftMargin: 24 + Text { + text: qsTr("Browser Tab") + } + Switch { + checked: browserBtn.enabled + onCheckedChanged: function(value) { + browserBtn.enabled = this.checked + } + } + Text { + text: qsTr("experimental (web3 not supported yet)") + } + } + + RowLayout { + anchors.top: browserTabSettings.bottom + anchors.topMargin: 20 + anchors.left: parent.left + anchors.leftMargin: 24 + Text { + text: qsTr("Node Management Tab") + } + Switch { + checked: nodeBtn.enabled + onCheckedChanged: function(value) { + nodeBtn.enabled = this.checked + } + } + Text { + text: qsTr("under development") + } + } } + +/*##^## +Designer { + D{i:0;height:400;width:700} +} +##^##*/ diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index c7598d0c0f..f778084ab8 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -79,10 +79,11 @@ RowLayout { TabButton { id: browserBtn + visible: this.enabled width: 40 - height: 40 + height: this.enabled ? 40 : 0 text: "" - anchors.topMargin: 50 + anchors.topMargin: this.enabled ? 50 : 0 anchors.horizontalCenter: parent.horizontalCenter anchors.top: walletBtn.top background: Rectangle { @@ -125,10 +126,11 @@ RowLayout { TabButton { id: nodeBtn + visible: this.enabled width: 40 - height: 40 + height: this.enabled ? 40 : 0 text: "" - anchors.topMargin: 50 + anchors.topMargin: this.enabled ? 50 : 0 anchors.horizontalCenter: parent.horizontalCenter anchors.top: profileBtn.top background: Rectangle {