Unverified Commit 901cf22d authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6961 from Williangalvani/disabledCheckbox

Style tweaks
parents f739d087 2091f598
...@@ -59,8 +59,8 @@ void QGCPalette::_buildMap(void) ...@@ -59,8 +59,8 @@ void QGCPalette::_buildMap(void)
DECLARE_QGC_COLOR(buttonHighlightText, "#2c2c2c", "#ffffff", "#2c2c2c", "#000000") DECLARE_QGC_COLOR(buttonHighlightText, "#2c2c2c", "#ffffff", "#2c2c2c", "#000000")
DECLARE_QGC_COLOR(primaryButton, "#585858", "#8cb3be", "#585858", "#8cb3be") DECLARE_QGC_COLOR(primaryButton, "#585858", "#8cb3be", "#585858", "#8cb3be")
DECLARE_QGC_COLOR(primaryButtonText, "#2c2c2c", "#000000", "#2c2c2c", "#000000") DECLARE_QGC_COLOR(primaryButtonText, "#2c2c2c", "#000000", "#2c2c2c", "#000000")
DECLARE_QGC_COLOR(textField, "#ffffff", "#ffffff", "#585858", "#ffffff") DECLARE_QGC_COLOR(textField, "#ffffff", "#ffffff", "#707070", "#ffffff")
DECLARE_QGC_COLOR(textFieldText, "#808080", "#000000", "#bfbfbf", "#000000") DECLARE_QGC_COLOR(textFieldText, "#808080", "#000000", "#000000", "#000000")
DECLARE_QGC_COLOR(mapButton, "#585858", "#000000", "#585858", "#000000") DECLARE_QGC_COLOR(mapButton, "#585858", "#000000", "#585858", "#000000")
DECLARE_QGC_COLOR(mapButtonHighlight, "#585858", "#be781c", "#585858", "#be781c") DECLARE_QGC_COLOR(mapButtonHighlight, "#585858", "#be781c", "#585858", "#be781c")
DECLARE_QGC_COLOR(mapIndicator, "#585858", "#be781c", "#585858", "#be781c") DECLARE_QGC_COLOR(mapIndicator, "#585858", "#be781c", "#585858", "#be781c")
......
...@@ -53,14 +53,24 @@ CheckBox { ...@@ -53,14 +53,24 @@ CheckBox {
Rectangle { Rectangle {
id: baserect id: baserect
gradient: Gradient { property var enabledGradient: Gradient {
GradientStop {color: "#eee" ; position: 0} GradientStop {color: "#eee" ; position: 0}
GradientStop {color: control.pressed ? "#eee" : "#fff" ; position: 0.1} GradientStop {color: control.pressed ? "#eee" : "#fff" ; position: 0.1}
GradientStop {color: "#fff" ; position: 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 radius: ScreenTools.defaultFontPixelHeight * 0.16
anchors.fill: parent anchors.fill: parent
border.color: control.activeFocus ? "#47b" : "#999" border.color: control.activeFocus ? "#47b" : "#999"
opacity: control.enabled ? 1 : 0.5
} }
Image { Image {
......
...@@ -40,9 +40,9 @@ Button { ...@@ -40,9 +40,9 @@ Button {
background: Rectangle { background: Rectangle {
implicitWidth: ScreenTools.implicitComboBoxWidth implicitWidth: ScreenTools.implicitComboBoxWidth
implicitHeight: ScreenTools.implicitComboBoxHeight implicitHeight: ScreenTools.implicitComboBoxHeight
color: control._qgcPal.button color: control._qgcPal.textField
border.width: control._showBorder ? 1: 0 border.width: enabled ? 1 : 0
border.color: control._qgcPal.buttonText border.color: "#999"
QGCColoredImage { QGCColoredImage {
id: image id: image
...@@ -52,7 +52,7 @@ Button { ...@@ -52,7 +52,7 @@ Button {
anchors.rightMargin: _dropImageMargin anchors.rightMargin: _dropImageMargin
anchors.right: parent.right anchors.right: parent.right
source: "/qmlimages/arrow-down.png" source: "/qmlimages/arrow-down.png"
color: control._qgcPal.buttonText color: control._qgcPal.textFieldText
} }
} }
...@@ -67,7 +67,7 @@ Button { ...@@ -67,7 +67,7 @@ Button {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: centeredLabel ? parent.horizontalCenter : undefined anchors.horizontalCenter: centeredLabel ? parent.horizontalCenter : undefined
text: control.currentText text: control.currentText
color: control._qgcPal.buttonText color: control._qgcPal.textFieldText
font.pointSize: pointSize font.pointSize: pointSize
} }
} }
......
...@@ -61,6 +61,7 @@ TextField { ...@@ -61,6 +61,7 @@ TextField {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
border.width: enabled ? 1 : 0
border.color: root.activeFocus ? "#47b" : "#999" border.color: root.activeFocus ? "#47b" : "#999"
color: qgcPal.textField color: qgcPal.textField
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment