[Cuis-dev] PluggableButton
Juan Vuletich
JuanVuletich at zoho.com
Mon Apr 4 13:10:02 PDT 2022
On 4/2/2022 4:15 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> I contributed the ButtonMorph in Cuis-Smalltalk-UI, in the UI-Widgets
> package. It adds the behaviors I need for DrGeo.
>
> you can check it out
>
> Hilaire
>
>
> Le 01/04/2022 à 20:23, Juan Vuletich a écrit :
>> I think it is best to avoid another button class. Please hack
>> PluggableButton as much as needed to get the color / border and hover
>> behavior as you need, and email me the change set. I'll review it,
>> and maybe I'll make the option a flag in Theme, or maybe a
>> preference, to include it in base Cuis.
> --
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu
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.
-----Workspace1---- ButtonMorph
b := ButtonMorph new.
b openInWorld.
b morphPosition: 100 at 100 extent: 200 at 100.
b color: Color yellow darker.
b borderWidth: 5; borderColor: Color green.
b icon: Theme current closeIcon.
b selectedColor: Color tan.
b argument: false.
b model: [ :b | b print. b ] stateGetter: #value: action: #print label: nil.
b argument: true. b redrawNeeded.
b argument: false. b redrawNeeded.
b disable.
b enable.
b adoptWidgetsColor: Color pink.
-------------------------
---- Workspace 2 ---- PluggableButtonMorph
b := PluggableButtonMorph new.
b openInWorld.
b morphPosition: 400 at 100 extent: 200 at 100.
b color: Color yellow darker.
b borderWidth: 5; borderColor: Color green.
b roundButtonStyle: false.
b magnifiedIcon: Theme current closeIcon.
b mouseOverColor: Color tan.
b model: [ :b | b print. b ] stateGetter: #value: stateGetterArgument:
false action: #print label: nil.
b stateGetterArgument: true. b redrawNeeded.
b stateGetterArgument: false. b redrawNeeded.
b disable.
b enable.
b adoptWidgetsColor: Color pink.
-------------------
If you think this is ok, I'll integrate it.
Cheers,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220404/31245d06/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 5097-CuisCore-JuanVuletich-2022Apr04-13h01m-jmv.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220404/31245d06/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: UnsavedChangesTo-UI-Widgets-jmv.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220404/31245d06/attachment-0001.ksh>
More information about the Cuis-dev
mailing list