MagnifierMorph broken in 6.0 alpha

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

MagnifierMorph broken in 6.0 alpha

Stéphane Rollandin-2
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

Reply | Threaded
Open this post in threaded view
|

Re: MagnifierMorph broken in 6.0 alpha

marcel.taeumel
Hi Stef,

I could not reproduce the expected behavior in Squeak 3.81 nor Squeak 4.2. You can resize the MagnifierMorph via its Halo.

What works is that you can press the yellow button (i.e. the right one on a three-button mouse) and then drag to resize. The code is in MagnifierMorph >> #mouseDown:  since 1999.

If you are referring to CTRL+RED/Drag, this has always been CTRL+YELLOW/Drag due to the VM conversion. Although, the CTRL flag is not checked in MagnifierMorph.

Best,
Marcel

Am 11.05.2018 19:32:20 schrieb Stéphane Rollandin <[hidden email]>:

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]. "<===>

"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



Reply | Threaded
Open this post in threaded view
|

Re: MagnifierMorph broken in 6.0 alpha

Stéphane Rollandin
 > What works is that you can press the yellow button (i.e. the right one
 > on a three-button mouse) and then drag to resize.

Yes, you are right. No problem then.

Stef