[squeak-dev] MagnifierMorph broken in 6.0 alpha

Stéphane Rollandin hepta at zogotounga.net
Thu May 10 13:33:38 UTC 2018


Still in the latest downloadable 6.0 alpha:

The MagnifierMorph is supposed to grow in size and zooming factor when 
one does a mouse drag with control key pressed. This does not work anymore.

More generally, it is not possible to define a ctrl+drag behavior (this 
have been true for a while). I did fix this for muO though.

In 6.0, here is how I did it:

I added a line in the following method:

-----------------------

PasteUpMorph>>tryInvokeMetaMenu: anEvent

	| innerMost target |
	Preferences cmdGesturesEnabled ifFalse: [^ self].
	Preferences eToyFriendly ifTrue: [^ self].
	
	innerMost := (self morphsAt: anEvent position unlocked: true) first.

	innerMost honorsCtrlMetaMenu ifFalse: [^ self].  "<=== here"
	
	"Traverse the owner chain if some morph does not want to show its meta 
menu."
	target := innerMost.
	[target isNil or: [target wantsMetaMenu]] whileFalse: [target := target 
owner].
	target ifNil: [^ self].
	
	target invokeMetaMenu: anEvent.
	anEvent ignore.


------------------------

... with Morph>>#honorsCtrlMetaMenu returning true, overriden by false 
for any morph wanting to have ctrl+drag work (for example, MagnifierMorph)


Stef


More information about the Squeak-dev mailing list