Mantis - Squeak
Viewing Issue Advanced Details
3818 Morphic minor always 06-18-06 05:00 06-18-06 07:30
wiz  
 
normal  
new 3.9  
open  
none    
none  
0003818: [Bug] Menu Thumbnail icons misdrawn when targeting large morphs.
For this one.
From objects get an ellipse
Call up halos and request the menu. ( The menu will come up and the header will have a 28x28 pixel icon of the ellipse.)
Now holding the shift key down (to maintain the aspect ratio) grow the ellipse until it is large.
Call up halos an request the menu. ( The header will now have an icon that shows only the top left portion of the ellipse.
This is unexpected because the scaling routines should just compensate for the difference in size. The Icons should look the same since the morph is the same except for scale.

I have looked into the underlying routines but nothing obvious in the code has presented itself as the culprit. Somehow the low level routines that are supposed to magnify seem to be doing something strange.

I noticed a similar problem in Mantis 0003333. There the issue was the centering of the rollover heighlighting.

I've uploaded MenuThumbs.gif which shows snapshots of the two menu headers along with the extents of the ellipse.
 MenuThumbs.gif [^] (5,233 bytes) 06-18-06 05:00

Notes
(0005273)
wiz   
06-18-06 07:27   
Ok, I've found what's causing it.

Not what I expected.

before the icon or thumbnail is scaled it is accessed thusly:

dgd 9/12/2004 20:33 Morph iconOrThumbnail {thumbnail}

iconOrThumbnail
    "Answer an appropiate form to represent the receiver"

    ^ self icon
        ifNil: [ | maxExtent fb |
   maxExtent := 320 @ 240.
            fb := self fullBounds.
            fb area <= (maxExtent x * maxExtent y)
                ifTrue: [self imageForm]
                ifFalse: [self imageFormForRectangle: (fb topLeft extent: maxExtent)]
        ]

The hard coded maxExtent is what is clipping the large morphs.

The question I have now is "Is this esthetically desirable?"

On the one had it clues you in to the fact you are looking at a large morph. It also preserves some detail of the portion of the morph it shows.

On the other hand it will not show the full shape of the morph as a thumbnail. This needs some use testing and some clarification of intent.

My personal preference leans toward seeing the full shape of the morph.

Hmm. I wonder what diego would have to say?

In any event this could stand some enhancement to remove the hard coded values from the routine and possibly improve on the logic that tests area.

Yours in service, -- Jerome Peace
(0005274)
wiz   
06-18-06 07:30   
Reminder sent to: dgd

Hi Diego,

Any thoughts or clarifications.
Are the thumbnails coming out as you wished them to?
What do you think of showing thumbnails of the full morph even for the large ones?

Yours in service, -- Jerome Peace