[squeak-dev] The Trunk: System-kfr.677.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jul 19 10:08:47 UTC 2014
Karl Ramberg uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-kfr.677.mcz
==================== Summary ====================
Name: System-kfr.677
Author: kfr
Time: 19 July 2014, 11:59:39.569 am
UUID: 433661e2-5f76-1f4b-9498-39bf61ed6bd0
Ancestors: System-eem.676
Don't put collapsed windows behind the docking bar.
=============== Diff against System-eem.676 ===============
Item was changed:
----- Method: RealEstateAgent class>>assignCollapseFrameFor: (in category 'utilities') -----
assignCollapseFrameFor: aSSView
"Offer up a location along the left edge of the screen for a collapsed SSView. Make sure it doesn't overlap any other collapsed frames."
| grid otherFrames topLeft viewBox collapsedFrame extent newFrame verticalBorderDistance top |
grid := 8.
verticalBorderDistance := 8.
aSSView isMorph
ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | w ~= aSSView])
collect: [:w | w collapsedFrame]
thenSelect: [:rect | rect notNil].
viewBox := self maximumUsableAreaInWorld: aSSView world]
ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers
collect: [:aController | aController view ~= aSSView ifTrue: [aController view collapsedFrame]]
thenSelect: [:rect | rect notNil].
viewBox := Display boundingBox].
collapsedFrame := aSSView collapsedFrame.
extent := collapsedFrame notNil
ifTrue: [collapsedFrame extent]
ifFalse: [aSSView isMorph
ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2)]
ifFalse: [(aSSView labelText extent x + 70) @ aSSView labelHeight
min: aSSView labelDisplayBox extent]].
collapsedFrame notNil
ifTrue: [(otherFrames anySatisfy: [:f | collapsedFrame intersects: f])
ifFalse: ["non overlapping"
^ collapsedFrame]].
top := viewBox top + verticalBorderDistance.
[topLeft := viewBox left @ top.
newFrame := topLeft extent: extent.
newFrame bottom <= (viewBox height - verticalBorderDistance)]
whileTrue:
[(otherFrames anySatisfy: [:w | newFrame intersects: w])
ifFalse: ["no overlap"
^ newFrame].
top := top + grid].
"If all else fails... (really to many wins here)"
+ ^ 0 @ 20 extent: extent!
- ^ 0 @ 0 extent: extent!
More information about the Squeak-dev
mailing list
|