[Cuis-dev] Enable state for pluggable button

Gerald Klix cuis.01 at klix.ch
Thu Nov 18 22:36:21 PST 2021


On 11/18/21 9:04 PM, Hilaire Fernandes via Cuis-dev wrote:
> Hi Juan,
> 
> I add an enable state to the pluggableButton and refactored a bit the 
> class.
> 
> Hilaire
> 
> 

Hi Hilaire,

Cool!

I have similar needs, therefore I added
something similar to Haver:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/ui/Buttons.pck.st

However there are differences, for example I also added
a selector to dynamically change the label.

My class inherits all the mouse handling from its base class.
If the user clicks a disabled button, it flashes in red:
https://hg.sr.ht/~cy-de-fect/HaverOnCuis/browse/haver/ui/Buttons.pck.st#L289

I think this behavior gives the user better feedback,
meaning: A disabled button behaves still like an enabled
button, unless you click it.


Just my two cent,

Gerald


More information about the Cuis-dev mailing list