Polymorph layout: images in a column

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

Polymorph layout: images in a column

Schwab,Wilhelm K
Gary,

If I create a column and place an alpha image in it, is there a way to get the image to scale, ideally to the width of the column?  As it is, I'm setting fixed extents, but somewhat works against what I would like to leave to the column?

Bill




Reply | Threaded
Open this post in threaded view
|

Re: Polymorph layout: images in a column

Gary Chambers-4
Something like the following?
 
(UITheme builder
 newColumn: {
  (UITheme builder newImage: LogoImageMorph defaultLogoForm)
   hResizing: #spaceFill;
   vResizing: #spaceFill;
   layout: #scaledAspect})
 openInWindow

Regards, Gary
----- Original Message -----
Sent: Monday, March 19, 2012 8:36 PM
Subject: [Pharo-project] Polymorph layout: images in a column

Gary,

If I create a column and place an alpha image in it, is there a way to get the image to scale, ideally to the width of the column?  As it is, I'm setting fixed extents, but somewhat works against what I would like to leave to the column?

Bill




Reply | Threaded
Open this post in threaded view
|

Re: Polymorph layout: images in a column

Gary Chambers-4
Though that made me notice that minExtent is calculated on original image size without taking scaling options into account...

Regards, Gary
----- Original Message -----
Sent: Wednesday, March 21, 2012 4:07 PM
Subject: Re: [Pharo-project] Polymorph layout: images in a column

Something like the following?
 
(UITheme builder
 newColumn: {
  (UITheme builder newImage: LogoImageMorph defaultLogoForm)
   hResizing: #spaceFill;
   vResizing: #spaceFill;
   layout: #scaledAspect})
 openInWindow

Regards, Gary
----- Original Message -----
Sent: Monday, March 19, 2012 8:36 PM
Subject: [Pharo-project] Polymorph layout: images in a column

Gary,

If I create a column and place an alpha image in it, is there a way to get the image to scale, ideally to the width of the column?  As it is, I'm setting fixed extents, but somewhat works against what I would like to leave to the column?

Bill




Reply | Threaded
Open this post in threaded view
|

Re: Polymorph layout: images in a column

Schwab,Wilhelm K
In reply to this post by Gary Chambers-4
Gary,

You're good :)  That might be exactly what I need.  I just need to figure out how to make it optional.  My MVP framework is reducing to presenters being factories for morph/model pairs, and I am pretty much resigning to creating rows and columns using your Polymorph methods.  It is different from Dolphin's approach, but seeing what I have been able to do and (even more) looking at what you have produced, it is looking like a good compromise.

My big mission is to "say it once."  Hopefully my humble framework will enable that while playing nicely with Polymorph.   It has various obsolete categories to retain things that I might want to resurrect, but it is becoming usable.

Thanks!

Bill




From: [hidden email] [[hidden email]] on behalf of Gary Chambers [[hidden email]]
Sent: Wednesday, March 21, 2012 12:07 PM
To: [hidden email]
Subject: Re: [Pharo-project] Polymorph layout: images in a column

Something like the following?
 
(UITheme builder
 newColumn: {
  (UITheme builder newImage: LogoImageMorph defaultLogoForm)
   hResizing: #spaceFill;
   vResizing: #spaceFill;
   layout: #scaledAspect})
 openInWindow

Regards, Gary
----- Original Message -----
Sent: Monday, March 19, 2012 8:36 PM
Subject: [Pharo-project] Polymorph layout: images in a column

Gary,

If I create a column and place an alpha image in it, is there a way to get the image to scale, ideally to the width of the column?  As it is, I'm setting fixed extents, but somewhat works against what I would like to leave to the column?

Bill