The Trunk: MorphicExtras-ul.60.mcz

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

The Trunk: MorphicExtras-ul.60.mcz

commits-2
Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ul.60.mcz

==================== Summary ====================

Name: MorphicExtras-ul.60
Author: ul
Time: 4 December 2009, 2:09:14 am
UUID: a1cd0e90-a4e0-6b4c-a01f-76a733318732
Ancestors: MorphicExtras-ul.59

- make sure that thumbnail creation doesn't leave opened morphs open (tests don't open Transcript/Workspace)

=============== Diff against MorphicExtras-ul.59 ===============

Item was changed:
  ----- Method: PartsBin class>>thumbnailForQuad:color: (in category 'thumbnail cache') -----
  thumbnailForQuad: aQuint color: aColor
  "Answer a thumbnail for a morph obtaining as per the quintuplet provided, creating the thumbnail if necessary.  If it is created afresh, it will also be cached at this time"
 
  | aThumbnail aSymbol formToThumbnail labeledItem |
  aSymbol := aQuint third.
  Thumbnails at: aSymbol ifPresent: [ :thumb | ^thumb ].
  formToThumbnail := aQuint at: 5 ifAbsent: [].
  formToThumbnail ifNil: [
  labeledItem := (Smalltalk at: aQuint first) perform: aQuint second.
  formToThumbnail := labeledItem imageForm: 32 backgroundColor: aColor forRectangle: labeledItem fullBounds.
  formToThumbnail replaceColor: aColor withColor: Color transparent.
+ labeledItem delete.
  ].
 
  aThumbnail := Thumbnail new makeThumbnailFromForm: formToThumbnail.
  self cacheThumbnail: aThumbnail forSymbol: aSymbol.
  ^ aThumbnail
 
  "PartsBin initialize"!