[Cuis-dev] Column type layout morph anomaly

Hilaire Fernandes hfern at free.fr
Sat Aug 5 11:05:33 PDT 2023


Your proportional should add up to 1, otherwise the system will make a 
choice for you. Here it chooses to have no void, and reallocate the free 
space proportionally.

It is my interpretation.

Nevertheless, you should not meet a situation when you do not add up to 
1. Why have unused space in a layout? Space screen is expensive.

If you want to trick the system you can add transparent morph:

|l b1 b2 t |
l  :=  LayoutMorph  newColumn  .
b1  :=  BoxedMorph  new  layoutSpec:  (LayoutSpec  proportionalHeight:  0.1)::  color:  Color  green.
b2  :=  BoxedMorph  new  layoutSpec:  (LayoutSpec  proportionalHeight:  0.1)::  color:  Color  red.
t  :=  BoxedMorph  new  layoutSpec:  (LayoutSpec  proportionalHeight:  0.8)::  color:  Color  transparent  .
l  addMorph:  b1.
l  addMorph:  t.
l  addMorph:  b2.
l  openInWorld.


Le 05/08/2023 à 17:31, Szabolcs Komáromi via Cuis-dev a écrit :
> Hi,
>
> Shouldn't this code produce a morph with a green and red box inside 
> the gray box at the gray box's top edge? And the red and green box 
> should have a height 10% of the gray box's height? Every other 
> direction works that way.
>
> Or I don't understand something fundamental about laying out morphs. 
> The furthermost Workspace's morph looks wrong to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230805/ca673264/attachment.htm>


More information about the Cuis-dev mailing list