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! |
It's very easy for there to be no Docking Bar. It's very easy for the Docking Bar to be higher than 20 pixels. On Sat, Jul 19, 2014 at 5:08 AM, <[hidden email]> wrote: Karl Ramberg uploaded a new version of System to project The Trunk: |
Well, this was the simplest fix. When the number of collapsed windows overflowed the screen vertical space the algorithm gave up and piled them at 0@0. Now they pile up 20 pixels down instead.
Feel free to enhance further :-) Karl On Sat, Jul 19, 2014 at 6:25 PM, Chris Muller <[hidden email]> wrote:
|
In reply to this post by commits-2
On Sat, Jul 19, 2014 at 10:08:01AM +0000, [hidden email] wrote:
> 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. That problem has been bothering me for years. Thanks for fixing it. Dave |
In reply to this post by Chris Muller-3
It is quite ugly code to detect and use the height of the DockingBar: aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]].
I could commit this change if it is wanted. Karl On Sat, Jul 19, 2014 at 6:25 PM, Chris Muller <[hidden email]> wrote:
|
On Sun, Jul 20, 2014 at 4:29 AM, karl ramberg <[hidden email]> wrote:
+1. Seems like the right thing to do.
best, Eliot
|
Free forum by Nabble | Edit this page |