'From Squeak3.2alpha of 3 October 2001 [latest update: #4441] on 18 October 2001 at 9:54:04 am'! "Change Set: thumbnailScaling-nk Date: 18 October 2001 Author: Ned Konz The thumbnails used in the PartsBins (including in the Objects tool) were being stretched vertically when they were too long. You can see this in the StringMorph and Clock thumbnails. This fixes the scaling so that the aspect ratio is maintained. The thumbnail cache is cleared, so it may take a few seconds to see some of the objects tool pages the first time."! !Thumbnail methodsFor: 'thumnail creation' stamp: 'nk 10/18/2001 09:52'! makeThumbnailFromForm: aForm "Make a thumbnail from the form provided, obeying my min and max width and height preferences" | scaleX scaleY | scaleY _ minimumHeight / aForm height. "keep height invariant" scaleX _ ((aForm width * scaleY) <= maximumWidth) ifTrue: [scaleY] "the usual case; same scale factor, to preserve aspect ratio" ifFalse: [scaleY _ maximumWidth / aForm width]. self form: (aForm magnify: aForm boundingBox by: (scaleX @ scaleY) smoothing: 2). self extent: originalForm extent! ! "Postscript: Clear out the old thumbnails" PartsBin clearThumbnailCache!