[Pkg] The Trunk: Morphic-cmm.588.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Nov 15 02:31:08 UTC 2011

Chris Muller uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-cmm.588
Author: cmm
Time: 9 November 2011, 10:18:08.112 pm
UUID: 8657a30a-d7e4-4e13-8ded-4901eef80588
Ancestors: Morphic-ul.587

- Enhance the best IDE-enhancement of 2010 -- Bert's gesture to grow any window (Morph, actually) with a Control + Blue-click + drag.  This makes it possible to rapidly move and size windows, which developers do 1000 times per day.
	However, when the window is near the edge of the desktop, growing a window requires at least two gestures:  one to grow the window, another to reposition it fully onto the desktop so the contents can be seen.
	This tweak reduces growing any window to one gesture by ensuring it stays positioned within the desktop.  This also now allows rapid vertical or horizontal maximizing with only a gross-motor gesture instead of a fine one.

=============== Diff against Morphic-ul.587 ===============

Item was changed:
  ----- Method: HaloMorph>>mouseMove: (in category 'event handling') -----
  mouseMove: evt
  	"Drag our target around or resize it"
  		ifTrue: [
  			| oldExtent newExtent newPosition |
  			newExtent := originalExtent + (evt position - positionOffset * 2).
  			(newExtent x > 1 and: [newExtent y > 1])
  				ifTrue: [
  					oldExtent := target extent.
+ 					target setExtentFromHalo: (newExtent min: owner extent).
- 					target setExtentFromHalo: newExtent.
  					newPosition := target position - (target extent - oldExtent // 2).
+ 					newPosition := (newPosition x min: owner extent x - newExtent x max: 0) @ (newPosition y min: owner extent y - newExtent y max: 0).
  					target setConstrainedPosition: newPosition hangOut: true]]
  		ifFalse: [
  			| thePoint |
  			thePoint := target point: (evt position - positionOffset) from: owner.
  			target setConstrainedPosition: thePoint hangOut: true.

More information about the Packages mailing list