|
If I set a button to disabled by using .setEnabled(false), the theme picks up the if="disabled" alias but it will switch to the if="hover" alias if the mouse moves over it. This gives the impression that the button is still clickable. Also, it doesn't switch back leaving the button in the hover state.
I thought I could nest the <alias> so all others would go under the default but breaks the rules of the XML so I guess the library doesn't cater for that.
To recreate (if using Eforen.xml):
Under: <select name="eforen.button.background">
Add: <alias ref="-eforen.button" tint="#777777" if="disabled"/>
Call .setEnabled(false) on a button in your program.
The button will be initially darker than the rest but after you hover over it the tint changes to the hover color and doesn't change back. It may also react to keyboard focus. Clicking the button does nothing, as expected.
Is this a bug or am I doing something wrong?
Thanks,
Max
|