[Cuis-dev] Bugfix - PluggableButtonMorph
Juan Vuletich
juan at cuis.st
Mon May 19 07:45:53 PDT 2025
Thanks Joel.
This is now at GitHub.
Cheers,
On 5/15/2025 12:47 PM, Joel Camera via Cuis-dev wrote:
> Hi Folks!
> Here I bring a bugfix of PluggableButtonMorph.
> The bug is that when changing the label it loses all its padding.
> How to trigger it: create a LayoutMorph, create a button, add the
> button to the LayoutMorph and then change its label.
> layoutMorph := LayoutMorph newColumn.
> button := PluggableButtonMorph model: nil action: nil label: 'hello'.
> button openInWorld.
> layoutMorph addMorph: button.
> layoutMorph openInWorld.
> button label: 'bye'.
>
> If something new happens to the LayoutMorph (like adding another
> morph), the button will recover its padding.
>
> The problem is that when changing the label, it sets the instance
> variable extent without telling its parents that it was changed.
> Fortunately, the setter of the extent morphExtent: does that and using
> it solves the problem.
>
> Have a nice day!
>
> <https://10pines.com/>
>
>
> Joel Cámera
>
>
> Agile Software Development
>
>
> Alem 896, Floor 6, Buenos Aires, Argentina
>
> +54 9 011 6091 3125
>
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250519/61b2c62b/attachment-0001.htm>
More information about the Cuis-dev
mailing list