[squeak-dev] The Trunk: MorphicExtras-dtl.210.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Oct 14 21:13:40 UTC 2017


David T. Lewis uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-dtl.210.mcz

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

Name: MorphicExtras-dtl.210
Author: dtl
Time: 30 September 2017, 11:00:57.627669 am
UUID: 4c13263d-1a0c-4857-8906-4ea09598f70b
Ancestors: MorphicExtras-tpr.209

Reimplement RealEstateAgent class>>reduceByFlaps: to protect margins for size of flap handles, but no special case logic for 'Painting' flap, and do not reduce margins by 64 in any case.

This affects placement of SystemWindows, which avoids covering top flaps with a repositioned window. The previous implementation prevented placement of windows at the top portion of the display area if flaps were enabled in a project.

=============== Diff against MorphicExtras-tpr.209 ===============

Item was changed:
  ----- Method: RealEstateAgent class>>reduceByFlaps: (in category '*MorphicExtras-utilities') -----
  reduceByFlaps: aScreenRect 
  	"Return a rectangle that won't interfere with default shared flaps"
  
+ 	| top bottom left right |
  	Flaps sharedFlapsAllowed ifFalse: [^ aScreenRect copy].
+ 
+ 	top := bottom := left := right := 0.
+ 	Flaps globalFlapTabs do: [ :ft | | w h |
+ 			w := ft width.
+ 			h := ft height.
+ 			ft edgeToAdhereTo
+ 				caseOf: {
+ 					[ #top ] -> [ top := top max: h ].
+ 					[ #bottom ] -> [ bottom := bottom max: h ] .
+ 					[ #left ] -> [ left := left max: w ] .
+ 					[ #right ] -> [ right := right max: w ] .
+ 				}
+ 				otherwise: [] ].
+ 	^ Rectangle
+ 		origin: aScreenRect origin + (left @ top)
+ 		extent: aScreenRect extent - (bottom @ right).
+ !
- 	(Flaps globalFlapTabsIfAny allSatisfy:
- 			[:ft | ft flapID = 'Painting' translated or: [ft edgeToAdhereTo == #bottom]])
- 		ifTrue: [^ aScreenRect withHeight: aScreenRect height - 18]
- 		ifFalse: [^ aScreenRect insetBy: 64]!



More information about the Squeak-dev mailing list