From 37dab30d5e4eff6353991ae9ae287ed51a236ed3 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 3 Jun 2020 16:20:40 -0700 Subject: [PATCH] adopt new opaque combobox; fix toolbar color on contactlist only pane; fix settings pane color to pane color --- qml/main.qml | 26 ++++++++++++-------------- qml/panes/SettingsPane.qml | 16 +++++++++------- qml/widgets/Statusbar.qml | 8 ++++---- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/qml/main.qml b/qml/main.qml index 845ff519..bcd04f89 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -16,8 +16,6 @@ import "panes" import "widgets" import "utils.js" as Utils - - ApplicationWindow { id: windowItem width: 1200 @@ -133,7 +131,6 @@ ApplicationWindow { Rectangle { // Profile login/management pane Layout.fillHeight: true Layout.fillWidth: true - //anchors.fill: parent visible: false color: Theme.backgroundMainColor @@ -146,8 +143,7 @@ ApplicationWindow { Rectangle { // Settings pane Layout.fillHeight: true Layout.fillWidth: true - //anchors.fill: parent - color: Theme.backgroundMainColor + color: Theme.backgroundPaneColor SettingsPane { id: settingsPane @@ -159,7 +155,6 @@ ApplicationWindow { Rectangle { // Profile Add / Edit pane Layout.fillHeight: true Layout.fillWidth: true - //anchors.fill: parent color: Theme.backgroundMainColor @@ -173,7 +168,6 @@ ApplicationWindow { RowLayout { // CONTAINS EVERYTHING EXCEPT THE TOOLBAR Layout.fillHeight: true Layout.fillWidth: true - //anchors.fill: parent spacing: 0 Rectangle { // THE LEFT PANE WITH TOOLS AND CONTACTS @@ -222,6 +216,7 @@ ApplicationWindow { AddGroupPane { anchors.fill: parent } onCurrentIndexChanged: { + parentStack.updateToolbar() if (currentIndex == emptyPane) { toolbar.hideTitle() toolbar.rightMenuVisible = false @@ -246,8 +241,6 @@ ApplicationWindow { onCurrentIndexChanged : { updateToolbar(); statusbar.resetHeight() } - - function updateToolbar() { toolbar.hideTitle() toolbar.rightMenuVisible = false @@ -262,7 +255,12 @@ ApplicationWindow { } else { toolbar.leftMenuVisible = false toolbar.backVisible = true - toolbar.color = Theme.backgroundPaneColor + + if (currentIndex == profilePane && theStack.currentIndex == theStack.emptyPane) { + toolbar.color = Theme.backgroundMainColor + } else { + toolbar.color = Theme.backgroundPaneColor + } } } } @@ -270,12 +268,12 @@ ApplicationWindow { Component.onCompleted: updateToolbar() Connections { - target: Theme + target: Theme - onThemeChanged: { - parentStack.updateToolbar() - } + onThemeChanged: { + parentStack.updateToolbar() } + } } Statusbar { diff --git a/qml/panes/SettingsPane.qml b/qml/panes/SettingsPane.qml index 848f92ba..a847faa2 100644 --- a/qml/panes/SettingsPane.qml +++ b/qml/panes/SettingsPane.qml @@ -16,14 +16,14 @@ Opaque.SettingsList { // settingsPane anchors.fill: parent settings: Column { - anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenter: parent.horizontalCenter width: 700 Opaque.Setting { //: Language label: qsTr("setting-language") - field: ComboBox { + field: Opaque.ComboBox { id: cbLanguage anchors.right: parent.right anchors.left: parent.left @@ -64,13 +64,14 @@ Opaque.SettingsList { // settingsPane size: 8 } - Slider { + Opaque.Slider { id: zoomSlider - minimumValue: 0.5 + from: 0.5 // TODO: find out why > 2.0 halts desktop app on load - task: fix all the qml anchor/layout warnings on load - maximumValue: gcd.os == "android" ? 4.0 : 1.9 + to: gcd.os == "android" ? 4.0 : 1.9 value: gcd.themeScale - updateValueWhileDragging: false + live: false + stepSize: 0.1 onValueChanged: { gcd.themeScale = zoomSlider.value } @@ -87,11 +88,12 @@ Opaque.SettingsList { // settingsPane } } + Opaque.Setting { //: Theme label: qsTr("setting-theme") - field: ComboBox { + field: Opaque.ComboBox { id: cbTheme property bool inited: false anchors.right: parent.right diff --git a/qml/widgets/Statusbar.qml b/qml/widgets/Statusbar.qml index 8c8bc747..52e67b6c 100644 --- a/qml/widgets/Statusbar.qml +++ b/qml/widgets/Statusbar.qml @@ -184,11 +184,11 @@ Rectangle { } Connections { - target: Theme + target: Theme - onThemeChanged: { - changeStatus() - } + onThemeChanged: { + changeStatus() } + } }