From 125982a644f7465bca5dffc8208b94038eb2ab37 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 18 Oct 2018 12:25:11 -0300 Subject: [PATCH 1/5] QGCCheckBox: Change colors when disabled --- src/QmlControls/QGCCheckBox.qml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/QmlControls/QGCCheckBox.qml b/src/QmlControls/QGCCheckBox.qml index ed602c1..ac520ae 100644 --- a/src/QmlControls/QGCCheckBox.qml +++ b/src/QmlControls/QGCCheckBox.qml @@ -53,11 +53,20 @@ CheckBox { Rectangle { id: baserect - gradient: Gradient { + property var enabledGradient: Gradient { GradientStop {color: "#eee" ; position: 0} GradientStop {color: control.pressed ? "#eee" : "#fff" ; position: 0.1} GradientStop {color: "#fff" ; position: 1} } + property var disabledGradient: Gradient { + GradientStop {color: "#999" ; position: 0} + GradientStop {color: __qgcPal.textField ; position: 0.1} + GradientStop {color: __qgcPal.textField ; position: 0.9} + GradientStop {color: "#999" ; position: 1} + } + gradient: control.enabled ? enabledGradient : disabledGradient + + radius: ScreenTools.defaultFontPixelHeight * 0.16 anchors.fill: parent border.color: control.activeFocus ? "#47b" : "#999" From 3ed720b0db66058bcd7a2397b21dea7486560b7f Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 18 Oct 2018 11:13:47 -0300 Subject: [PATCH 2/5] QGCComboBox: change style so it matches with QGCTextField --- src/QmlControls/QGCComboBox.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index a39c05b..321df94 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -40,9 +40,9 @@ Button { background: Rectangle { implicitWidth: ScreenTools.implicitComboBoxWidth implicitHeight: ScreenTools.implicitComboBoxHeight - color: control._qgcPal.button - border.width: control._showBorder ? 1: 0 - border.color: control._qgcPal.buttonText + color: control._qgcPal.textField + border.width: enabled ? 1 : 0 + border.color: "#999" QGCColoredImage { id: image @@ -52,7 +52,7 @@ Button { anchors.rightMargin: _dropImageMargin anchors.right: parent.right source: "/qmlimages/arrow-down.png" - color: control._qgcPal.buttonText + color: control._qgcPal.textFieldText } } @@ -67,7 +67,7 @@ Button { anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: centeredLabel ? parent.horizontalCenter : undefined text: control.currentText - color: control._qgcPal.buttonText + color: control._qgcPal.textFieldText font.pointSize: pointSize } } From 0aefb51abbd0524501ded3d11fb1659d42ae4832 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 18 Oct 2018 11:14:34 -0300 Subject: [PATCH 3/5] QGCTextField: hide borders when disabled --- src/QmlControls/QGCTextField.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/QmlControls/QGCTextField.qml b/src/QmlControls/QGCTextField.qml index 7210f16..d8043b4 100644 --- a/src/QmlControls/QGCTextField.qml +++ b/src/QmlControls/QGCTextField.qml @@ -61,6 +61,7 @@ TextField { Rectangle { anchors.fill: parent + border.width: enabled ? 1 : 0 border.color: root.activeFocus ? "#47b" : "#999" color: qgcPal.textField } From 24c47ca08d9eb4e28ce242a3c48161e29a2c53af Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 25 Oct 2018 18:51:11 -0300 Subject: [PATCH 4/5] GCCheckBox: add opacity --- src/QmlControls/QGCCheckBox.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/QmlControls/QGCCheckBox.qml b/src/QmlControls/QGCCheckBox.qml index ac520ae..5dbfb55 100644 --- a/src/QmlControls/QGCCheckBox.qml +++ b/src/QmlControls/QGCCheckBox.qml @@ -70,6 +70,7 @@ CheckBox { radius: ScreenTools.defaultFontPixelHeight * 0.16 anchors.fill: parent border.color: control.activeFocus ? "#47b" : "#999" + opacity: control.enabled ? 1 : 0.5 } Image { From 2091f598dcd664d0e26d3afdfff064c0a8280b86 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 25 Oct 2018 19:32:19 -0300 Subject: [PATCH 5/5] QGCPalette: change Indoor mode textField colors --- src/QGCPalette.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index 6c54fea..3b10e10 100644 --- a/src/QGCPalette.cc +++ b/src/QGCPalette.cc @@ -59,8 +59,8 @@ void QGCPalette::_buildMap(void) DECLARE_QGC_COLOR(buttonHighlightText, "#2c2c2c", "#ffffff", "#2c2c2c", "#000000") DECLARE_QGC_COLOR(primaryButton, "#585858", "#8cb3be", "#585858", "#8cb3be") DECLARE_QGC_COLOR(primaryButtonText, "#2c2c2c", "#000000", "#2c2c2c", "#000000") - DECLARE_QGC_COLOR(textField, "#ffffff", "#ffffff", "#585858", "#ffffff") - DECLARE_QGC_COLOR(textFieldText, "#808080", "#000000", "#bfbfbf", "#000000") + DECLARE_QGC_COLOR(textField, "#ffffff", "#ffffff", "#707070", "#ffffff") + DECLARE_QGC_COLOR(textFieldText, "#808080", "#000000", "#000000", "#000000") DECLARE_QGC_COLOR(mapButton, "#585858", "#000000", "#585858", "#000000") DECLARE_QGC_COLOR(mapButtonHighlight, "#585858", "#be781c", "#585858", "#be781c") DECLARE_QGC_COLOR(mapIndicator, "#585858", "#be781c", "#585858", "#be781c")