2243: #keepMorphExtent

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

2243: #keepMorphExtent

KenDickey
Some Layout oddness..

In a Worpspace
-----
lm := LayoutMorph initializedInstance .
lm addMorph: ImageMorph initializedInstance
   layoutSpec: LayoutSpec keepMorphExtent.
lm openInWorld.
-----

Dragging shows artifacts.

Resize smaller makes morph lose size (does not keep morphExtent)

--
-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: 2243: #keepMorphExtent

KenDickey

lm := LayoutMorph initializedInstance .
lm addMorph: ((PluggableButtonMorph model: self action: #click)
                        icon: (Theme current perform: #closeIcon);
                        setBalloonText:'close me';
                        iconName: #close;
                        yourself)
   layoutSpec: LayoutSpec keepMorphExtent.
lm openInWorld.

===============

Drag size-adjust-handle to make icon smaller.  Not only does it shrink. !t never regrows!

---
-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
-KenD
Reply | Threaded
Open this post in threaded view
|

Re: 2243: #keepMorphExtent

Juan Vuletich-4
In reply to this post by KenDickey
On 4/24/2015 10:31 AM, Ken.Dickey wrote:

> Some Layout oddness..
>
> In a Worpspace
> -----
> lm := LayoutMorph initializedInstance .
> lm addMorph: ImageMorph initializedInstance
>     layoutSpec: LayoutSpec keepMorphExtent.
> lm openInWorld.
> -----
>
> Dragging shows artifacts.
>
> Resize smaller makes morph lose size (does not keep morphExtent)
>

Please add

ImageMorph >> minimumExtent
     ^image extent

to fix the artifacts (will be in next bunch of updates).

WRT #keepMorphExtent, I enhanced a bit the comment. The idea is to try
not to modify the morph extent, but distribute space amongst other
morphs inside the layout. But, if there's no enough room, try to make it
smaller (if morph allows this, see #minimumExtent, etc).

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: 2243: #keepMorphExtent

Juan Vuletich-4
In reply to this post by KenDickey
On 4/24/2015 4:28 PM, Ken.Dickey wrote:

> lm := LayoutMorph initializedInstance .
> lm addMorph: ((PluggableButtonMorph model: self action: #click)
> icon: (Theme current perform: #closeIcon);
> setBalloonText:'close me';
> iconName: #close;
> yourself)
>     layoutSpec: LayoutSpec keepMorphExtent.
> lm openInWorld.
>
> ===============
>
> Drag size-adjust-handle to make icon smaller.  Not only does it shrink. !t never regrows!
>
> ---
> -KenD

Yep. That's the effect of #keepMorphExtent. You might try #useAll to
allow regrowth.

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org