Re: [Pharo-users] Spec: scaling imageModels

2016-10-22 Thread Nicolai Hess
Fogbugz!

Am 22.10.2016 3:08 nachm. schrieb "Matteo Bellotto via Pharo-users" <
pharo-users@lists.pharo.org>:

>
>
> -- Weitergeleitete Nachricht --
> From: Matteo Bellotto <matte...@yahoo.it>
> To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
> Cc:
> Date: Sat, 22 Oct 2016 13:07:21 + (UTC)
> Subject: Re: [Pharo-users] Spec: scaling imageModels
> Hi Stef,
> sorry, I didn't get it from your first mail!
>
> Have I to submit the bug entry, and the fix, thorugh "fogbugz" or GitHub?
>
> thanks,
> Matteo
>
>
> Il Giovedì 20 Ottobre 2016 9:12, stepharo <steph...@free.fr> ha scritto:
>
>
> Hi matteo
>
> Please open a bug entry and submit a fix and there is a good chance that
> your enhancements
>
> will be added to Pharo.
>
> We cannot crawl the mails and do that in addition to all the rest. :)
>
>
> Stef
>
>
>
>
>


Re: [Pharo-users] Spec: scaling imageModels

2016-10-22 Thread Matteo Bellotto via Pharo-users
--- Begin Message ---
Hi Stef,sorry, I didn't get it from your first mail!
Have I to submit the bug entry, and the fix, thorugh "fogbugz" or GitHub?

thanks,Matteo   

Il Giovedì 20 Ottobre 2016 9:12, stepharo  ha scritto:
 

 Hi matteo

Please open a bug entry and submit a fix and there is a good chance that 
your enhancements

will be added to Pharo.

We cannot crawl the mails and do that in addition to all the rest. :)

Stef



   --- End Message ---


Re: [Pharo-users] Spec: scaling imageModels

2016-10-20 Thread stepharo

Hi matteo

Please open a bug entry and submit a fix and there is a good chance that 
your enhancements


will be added to Pharo.

We cannot crawl the mails and do that in addition to all the rest. :)

Stef



Re: [Pharo-users] Spec: scaling imageModels

2016-10-18 Thread matteob8 via Pharo-users
--- Begin Message ---
Hi Stef,
I think that an automatic scaled behaviour is very useful for 
ImageModel,
especially if you need to generate list of images, that automatically adapts
to their container (i.e. Thumbnails).

Playing with AlpahImageMorph I found that the desired behaviour can be
obtained setting the "layout" state to the "#scaledAspect" symbol.

So I've added the "ImageModel>>switchScaledLayout" method, that will 
simply
call its MorphicAdapter, through the command "self changed:
#switchScaledLayout with: {}".
Then I've created the "MorphicImageAdapter>>switchScaledLayout" method,
that switchs among the "#center" and "#scaledAspect" morph layouts (note:
"#center" is the default for the Spec's "MorpdicImageAdapter").
Below the code the code I used:


MorphicImageAdapter>>switchScaledLayout
"Switch between scaled and fixed representation"

self
widgetDo: [ :w | 
| oldLayout |
oldLayout := w layout.
oldLayout = #scaledAspect
ifTrue: [ w layout: #center ]
ifFalse: [ w layout: #scaledAspect ] ].




Please let me know if you have any advice,

Thanks,
Matteo



--
View this message in context: 
http://forum.world.st/Spec-scaling-imageModels-tp4918440p4919199.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

--- End Message ---


Re: [Pharo-users] Spec: scaling imageModels

2016-10-08 Thread stepharo

Hi matteo


Spec does not expose the complete API. Now if you need you can propose 
some extensions.


Stef