mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 16:33:15 +08:00
Add support for overriding the background color of a Tool button
Contributes to CURA-3577
This commit is contained in:
parent
09f23f5f91
commit
c85f635125
@ -206,7 +206,10 @@ QtObject {
|
|||||||
property bool down: control.pressed || (control.checkable && control.checked);
|
property bool down: control.pressed || (control.checkable && control.checked);
|
||||||
|
|
||||||
color: {
|
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");
|
return Theme.getColor("button_active_hover");
|
||||||
} else if(control.pressed || (control.checkable && control.checked)) {
|
} else if(control.pressed || (control.checkable && control.checked)) {
|
||||||
return Theme.getColor("button_active");
|
return Theme.getColor("button_active");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user