From c85f63512500e47c0888ec5bc02bfc33cf826d37 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 25 Apr 2017 16:09:51 +0200 Subject: [PATCH] Add support for overriding the background color of a Tool button Contributes to CURA-3577 --- resources/themes/cura/styles.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index a7c7dcb6cd..625ca4996c 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -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");