[Cuis-dev] Circular Toolbar

Juan Vuletich juan at jvuletich.org
Thu Sep 30 11:44:45 PDT 2021


On 9/30/2021 1:06 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> Thanks Juan for the fix on the Layout.
>
> I am resurrecting my circular toolbar experiment to use it with 
> DrGeo[1] as the main toolbar.
>
> I fixed a few things as the VectorGraphics API changed a bit since 
> then. There is a package[2] to test it.
>
> However I still have one issue: the morph is clipped to the inner 
> disc, drawn from this morph draw method. The external chevron button, 
> all around the disc are not clipped. Any idea why?
>
>
>
>
> [1] https://github.com/hilaire/cuis-xp/blob/master/CuisSubtoolbarsTigh.png
>
> [2] https://github.com/hilaire/cuis-xp/blob/master/Morphic-Circular.pck.st
>
>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

Hi Hilaire,

The problem is that ChevronMorph inherits from PluggableButtonMorph. But 
PluggableButtonMorph is a kind of Widget. From the Widget class comment:

"Hierarchy for morphs that are rectangle like, and that occupy an area 
that can be specified as a Rectangle. This means that, besides being of 
rectangular shape, sides are aligned with local coordinate axes. 
Including rectangles with rounded corners and such. The idea is that the 
'extent' ivar is all that's needed to establish our dimensions and shape."

ChevronMorph is not at all like that. Adding back methods from Morph 
that were redefined in Widget (see attach) it starts to work better. But 
I think a better way is to subclass MovableMorph, and maybe copy any 
instance variables and methods from PluggableButtonMorph that might be 
needed.

Maybe we'd rename Widget to make all this clearer. Or find some way to 
make it clear that it is a hierarchy of boring little squares, and 
nothing more.

Hope this helps.

-- 
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
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210930/853f48d5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 47069 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210930/853f48d5/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: UnsavedChangesTo-Morphic-Circular-jmv.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20210930/853f48d5/attachment-0001.ksh>


More information about the Cuis-dev mailing list