Add support for overriding the background color of a Tool button

Contributes to CURA-3577
This commit is contained in:
Arjen Hiemstra 2017-04-25 16:09:51 +02:00
parent 09f23f5f91
commit c85f635125

View file

@ -206,7 +206,10 @@ QtObject {
property bool down: control.pressed || (control.checkable && control.checked);
color: {
if(control.checkable && control.checked && control.hovered) {
if(control.customColor !== undefined && control.customColor !== null) {
return control.customColor
}
else if(control.checkable && control.checked && control.hovered) {
return Theme.getColor("button_active_hover");
} else if(control.pressed || (control.checkable && control.checked)) {
return Theme.getColor("button_active");