Morphic layoutInset: Rectangle vs Margin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Morphic layoutInset: Rectangle vs Margin

Stephan Eggermont-3
I only today found out why I couldn't get
layoutInset: to work like in older examples:
Rectangles are now forced to have normalized
origin and corner. The result is that the
inset tends to be at an unexpected side.
Replacing the Rectangle by a Margin (and
switching argument order) helps.

Stephan


Reply | Threaded
Open this post in threaded view
|

Re: Morphic layoutInset: Rectangle vs Margin

stepharo
Hi stefan

We introduced Margin because it encapsulates the logic of a amount
specified as one, two or four numbers.
I think that it works really nicely with Rectangle.
It avoids isKindOf: Point and other ugly checks.
Now about the layoutInset: I do not know.

Do you have tests and code?

Stef

Le 16/8/15 17:48, Stephan Eggermont a écrit :

> I only today found out why I couldn't get
> layoutInset: to work like in older examples:
> Rectangles are now forced to have normalized
> origin and corner. The result is that the
> inset tends to be at an unexpected side.
> Replacing the Rectangle by a Margin (and
> switching argument order) helps.
>
> Stephan
>
>
>
>