Issue 5130 in pharo: Remove magicHalo behavior.

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

Issue 5130 in pharo: Remove magicHalo behavior.

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.4

New issue 5130 by [hidden email]: Remove magicHalo behavior.
http://code.google.com/p/pharo/issues/detail?id=5130

MagicHalo are Halos that appears smoothly.
Was fun but no need for that. Let's travel light.

HandMorph>>triggerHaloFor: aMorph after: timeOut
        "Trigger automatic halo after the given time out for some morph"
        self addAlarm: #spawnMagicHaloFor: with: aMorph after: timeOut


HandMorph>>spawnMagicHaloFor: aMorph
        (self halo notNil and:[self halo target == aMorph]) ifTrue:[^self].
        aMorph addMagicHaloFor: self.



Morph>>addMagicHaloFor: aHand
        | halo prospectiveHaloClass |
        aHand halo
                ifNotNil: [
                        aHand halo target == self
                                ifTrue: [ ^ self ].
                        aHand halo isMagicHalo
                                ifFalse: [ ^ self ] ].
        prospectiveHaloClass := Smalltalk globals at: self haloClass ifAbsent: [  
HaloMorph ].
        halo := prospectiveHaloClass new.
        halo bounds: (halo worldBoundsForMorph: self).
        halo popUpMagicallyFor: self hand: aHand

probably a christmas present :)

We will have to remove it when we will undress the christmas tree.

MagicHalo seems to be halo that smoothly vanish and appear.


popUpFor: aMorph event: evt
        "This message is sent by morphs that explicitly request the halo on a  
button click. Note: anEvent is in aMorphs coordinate frame."

        | hand anEvent |
        self flag: #workAround. "We should really have some event/hand here..."
        anEvent := evt isNil
                                ifTrue:
                                        [hand := aMorph world activeHand.
                                        hand ifNil: [hand := aMorph world primaryHand].
                                        hand lastEvent transformedBy: (aMorph transformedFrom: nil)]
                                ifFalse:
                                        [hand := evt hand.
                                        evt].
        self target: aMorph.
        hand halo: self.
        hand world addMorphFront: self.
        positionOffset := anEvent position
                                - (aMorph point: aMorph position in: owner).
        self startStepping.
        (self haloTransitions or: [self isMagicHalo])
                ifTrue:
                        [self magicAlpha: 0.0.
                        self startSteppingSelector: #fadeInInitially]



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5130 in pharo: Remove magicHalo behavior.

pharo
Updates:
        Status: FixToInclude

Comment #1 on issue 5130 by [hidden email]: Remove magicHalo  
behavior.
http://code.google.com/p/pharo/issues/detail?id=5130

(No comment was entered for this change.)

Attachments:
        RemoveMagicHalo.1.cs  4.7 KB


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5130 in pharo: Remove magicHalo behavior.

pharo
Updates:
        Status: Closed

Comment #2 on issue 5130 by [hidden email]: Remove magicHalo  
behavior.
http://code.google.com/p/pharo/issues/detail?id=5130

in 14276


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker