[squeak-dev] The Trunk: System-kfr.677.mcz

karl ramberg karlramberg at gmail.com
Sat Jul 19 20:14:47 UTC 2014


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 at 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 <asqueaker at gmail.com> wrote:

> 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, <commits at source.squeak.org> 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.
>>
>> =============== 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!
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140719/cc63870e/attachment.htm


More information about the Squeak-dev mailing list