[Cuis-dev] PluggableButton
    Hilaire Fernandes 
    hilaire at drgeo.eu
       
    Wed Apr  6 05:33:30 PDT 2022
    
    
  
Hi Juan,
The color scheme does not work for me. I instantiate the button as:
     ^ PluggableButtonMorph
         model: presenter
         stateGetter: (array at: 5 ifAbsent: [ #isTool: ]) "Then 
optional argument"
         action: array third ::
         stateGetterArgument: (array size = 5 ifTrue:[nil] ifFalse: 
[array second]);
         icon: (DrGIcons for: array second);
         setBalloonText: array fourth;
         color: self buttonColor ;
         mouseOverColor: self buttonSelectedColor ;
         borderColor: self buttonColor muchDarker;
         borderWidth: 2;
         morphExtent: (DrGeoSystem toolbarIconSize + 4) asPoint;
         adoptWidgetsColor: self buttonColor;
         yourself
When the mouse is over a button or the button state is true, I want the 
mouse over color as background
Regarding, the selector and variable names, I suggest keeping it small 
to stateArgument (instead of stateGetterArgument), there is no confusion 
regarding its meaning.
I also suggest adding an optional argument for the action, actionArgument.
It does not matter if the color scheme does not work, my need may be a 
bit special. But it is good to have the optional stateArgument and 
actionArgument.
Hilaire
Le 04/04/2022 à 22:10, Juan Vuletich a écrit :
>
> Please try #5097 attached. This cs breaks your ButtonMorph, for it to 
> work again, use attached unsavedChanges...
>
> I slightly changed some of your selectors. I tried like this.
-- 
GNU Dr. Geo
http://drgeo.eu
http://blog.drgeo.eu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220406/382f44f0/attachment.htm>
    
    
More information about the Cuis-dev
mailing list