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

Eliot Miranda eliot.miranda at gmail.com
Sun Jul 20 18:21:27 UTC 2014


On Sun, Jul 20, 2014 at 4:29 AM, karl ramberg <karlramberg at gmail.com> wrote:

> 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.
>

+1.  Seems like the right thing to do.


>
> 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!
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140720/d2accfe9/attachment.htm


More information about the Squeak-dev mailing list