[squeak-dev] The Trunk: Morphic-jl.1308.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Sep 21 15:10:44 UTC 2016

Jens Lincke uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-jl.1308
Author: jl
Time: 21 September 2016, 5:09:23.877628 pm
UUID: 9e56c715-6e6d-d447-85fb-cf1869058d6b
Ancestors: Morphic-jl.1307

Make magic halos great again.

=============== Diff against Morphic-jl.1307 ===============

Item was changed:
  ----- Method: HaloMorph>>addHandle:on:send:to: (in category 'private') -----
  addHandle: handleSpec on: eventName send: selector to: recipient 
  	"Add a handle within the halo box as per the haloSpec, and set 
  	it up to respond to the given event by sending the given 
  	selector to the given recipient. Return the handle."
  	| handle aPoint |
  	aPoint := self
  				positionIn: haloBox
  				horizontalPlacement: handleSpec horizontalPlacement
  				verticalPlacement: handleSpec verticalPlacement.
  	handle := self
  				addHandleAt: aPoint
  				color: (Color colorFrom: handleSpec color)
  				icon: handleSpec iconSymbol
  				on: eventName
  				send: selector
  				to: recipient.
- 	self isMagicHalo
- 		ifTrue: [
- 			handle on: #mouseEnter send: #handleEntered to: self.
- 			handle on: #mouseLeave send: #handleLeft to: self].
  	^ handle!

Item was changed:
  ----- Method: HaloMorph>>isMagicHalo: (in category 'accessing') -----
  isMagicHalo: aBool
  	self setProperty: #isMagicHalo toValue: aBool.
+ 	aBool
+ 		ifTrue: [
+ 			self on: #mouseEnter send: #handleEntered to: self.
+ 			self on: #mouseLeave send: #handleLeft to: self]
+ 		ifFalse:[
+ 			"Reset everything"
+ 			self eventHandler ifNotNil: [:eh |
+ 				eh forgetDispatchesTo: #handleEntered;
+ 					forgetDispatchesTo: #handleLeft].
+ 			self stopStepping. "get rid of all"
+ 			self startStepping. "only those of interest"].!
- 	aBool ifFalse:[
- 		"Reset everything"
- 		self stopStepping. "get rid of all"
- 		self startStepping. "only those of interest"
- 	].!

More information about the Squeak-dev mailing list