modified toolbar button behaviour

This commit is contained in:
Yvonne Schmidt 2024-11-28 23:41:45 +01:00
parent b67379a6c3
commit 333f27a016

View File

@ -300,10 +300,17 @@ selector("selector.item.label", "hover") {
def enabledCommandToolbar = new Command<Button>() {
void execute(Button source) {
if (source.isEnabled())
if (source.isEnabled()){
source.setColor(ColorRGBA.White)
else
source.setColor(ColorRGBA.Gray)
def orangeBackground = new QuadBackgroundComponent(color(1, 0.5, 0, 1)); // Orange background
source.setBackground(orangeBackground);
} else{
source.setColor(ColorRGBA.White)
def grayBackground = new QuadBackgroundComponent(ColorRGBA.Gray); // Gray background
source.setBackground(grayBackground);
}
}