Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame | + grid := 8 px. + verticalBorderDistance := 8 px. + horizontalBorderDistance := 8 px. + - | 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]. + otherFrames sort: [:w | w right] ascending. collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph + ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)] + ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight - 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]]. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [top := viewBox top + verticalBorderDistance. + countInColumn := 0. + [topLeft := viewBox left @ top. + newFrame := topLeft extent: extent. + newFrame bottom <= (viewBox height - verticalBorderDistance)] + whileTrue: + [row := otherFrames select: [:w | newFrame intersects: w]. + column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance. + rowFrame := newFrame translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | rowFrame intersects: w]]. + (viewBox containsRect: rowFrame) ifTrue: [ + row ifEmpty: ["no overlap" + ^ rowFrame]. + countInColumn := countInColumn + 1]. + top := top + grid]. + column := column + 1]. + + "If all else fails... (really too many wins here)" - 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)" aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft | + grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px" - | grid otherFrames y free topLeft viewBox | - grid := 24. "should be mult of 8, since manual move is gridded by 8" aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox]. + otherFrames sort: [:w | w right] ascending. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [y := viewBox top. + countInColumn := 0. + [(y := y + grid) <= (viewBox height - grid)] + whileTrue: + [topLeft := viewBox left@y. + row := otherFrames select: [:w | topLeft = w topLeft]. + column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid. + currentRowLeft := topLeft translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | currentRowLeft = w topLeft]]. + (viewBox containsPoint: topLeft) ifTrue: [ + row ifEmpty: ["no overlap" + ^ topLeft]. + countInColumn := countInColumn + 1]]. + column := column + 1]. + - y := viewBox top. - [(y := y + grid) <= (viewBox height - grid)] - whileTrue: - [topLeft := viewBox left@y. - free := true. - otherFrames do: [:w | free := free & (topLeft ~= w topLeft)]. - free ifTrue: [^ topLeft]]. "If all else fails..." ^ 0 @ 0!
Sometimes you just might be dealing with more windows ... ;-) (Yes, I actually had this situation a few times by now on a 1920x1080 screen.)
https://1drv.ms/i/s!AjILzE17v-mzgaftIh9fIx9ruW1sowU?e=ZgLSZ3
Best, Christoph
________________________________ Von: commits@source.squeak.org commits@source.squeak.org Gesendet: Dienstag, 29. August 2023 19:41:30 An: squeak-dev@lists.squeakfoundation.org Betreff: [squeak-dev] The Inbox: System-ct.1424.mcz
Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame | + grid := 8 px. + verticalBorderDistance := 8 px. + horizontalBorderDistance := 8 px. + - | 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]. + otherFrames sort: [:w | w right] ascending. collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph + ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)] + ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight - 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]]. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [top := viewBox top + verticalBorderDistance. + countInColumn := 0. + [topLeft := viewBox left @ top. + newFrame := topLeft extent: extent. + newFrame bottom <= (viewBox height - verticalBorderDistance)] + whileTrue: + [row := otherFrames select: [:w | newFrame intersects: w]. + column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance. + rowFrame := newFrame translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | rowFrame intersects: w]]. + (viewBox containsRect: rowFrame) ifTrue: [ + row ifEmpty: ["no overlap" + ^ rowFrame]. + countInColumn := countInColumn + 1]. + top := top + grid]. + column := column + 1]. + + "If all else fails... (really too many wins here)" - 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)" aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft | + grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px" - | grid otherFrames y free topLeft viewBox | - grid := 24. "should be mult of 8, since manual move is gridded by 8" aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox]. + otherFrames sort: [:w | w right] ascending. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [y := viewBox top. + countInColumn := 0. + [(y := y + grid) <= (viewBox height - grid)] + whileTrue: + [topLeft := viewBox left@y. + row := otherFrames select: [:w | topLeft = w topLeft]. + column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid. + currentRowLeft := topLeft translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | currentRowLeft = w topLeft]]. + (viewBox containsPoint: topLeft) ifTrue: [ + row ifEmpty: ["no overlap" + ^ topLeft]. + countInColumn := countInColumn + 1]]. + column := column + 1]. + - y := viewBox top. - [(y := y + grid) <= (viewBox height - grid)] - whileTrue: - [topLeft := viewBox left@y. - free := true. - otherFrames do: [:w | free := free & (topLeft ~= w topLeft)]. - free ifTrue: [^ topLeft]]. "If all else fails..." ^ 0 @ 0!
LOL That gif was awesome
I like that you implemented collapsing windows into several columns. I often have a huge number of windows open as well. Collapsing all of them is often the only way to bring back sanity :-D
Best, Karl
On Tue, Aug 29, 2023 at 9:19 PM Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de> wrote:
Sometimes you just might be dealing with more windows ... ;-) (Yes, I actually had this situation a few times by now on a 1920x1080 screen.)
https://1drv.ms/i/s!AjILzE17v-mzgaftIh9fIx9ruW1sowU?e=ZgLSZ3
Best, Christoph
*Von:* commits@source.squeak.org commits@source.squeak.org *Gesendet:* Dienstag, 29. August 2023 19:41:30 *An:* squeak-dev@lists.squeakfoundation.org *Betreff:* [squeak-dev] The Inbox: System-ct.1424.mcz
Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance
otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
grid := 8 px.
verticalBorderDistance := 8 px.
horizontalBorderDistance := 8 px.
| 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].
otherFrames sort: [:w | w right] ascending. collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
ifTrue: [aSSView getRawLabel
width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
ifFalse: [(aSSView labelText
extent x + 70 px) @ aSSView labelHeight
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]].
column := 0.
countInColumn := nil.
[countInColumn = 0]
whileFalse:
[top := viewBox top + verticalBorderDistance.
countInColumn := 0.
[topLeft := viewBox left @ top.
newFrame := topLeft extent: extent.
newFrame bottom <= (viewBox height -
verticalBorderDistance)]
whileTrue:
[row := otherFrames select: [:w |
newFrame intersects: w].
column > 0 ifFalse: [rowFrame :=
newFrame] ifTrue: [
rowLeft := ((otherFrames
collect: [:w | w right]) take: column) last + horizontalBorderDistance.
rowFrame := newFrame
translateBy: (rowLeft @ 0).
row := otherFrames
select: [:w | rowFrame intersects: w]].
(viewBox containsRect: rowFrame)
ifTrue: [
row ifEmpty: ["no overlap"
^ rowFrame].
countInColumn :=
countInColumn + 1].
top := top + grid].
column := column + 1].
"If all else fails... (really too many wins here)"
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)" aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar
ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft
currentRowLeft rowLeft |
grid := 24 px. "should be mult of 8, since manual move is
gridded by 8 px"
| grid otherFrames y free topLeft viewBox |
grid := 24. "should be mult of 8, since manual move is gridded
by 8" aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
otherFrames sort: [:w | w right] ascending.
column := 0.
countInColumn := nil.
[countInColumn = 0]
whileFalse:
[y := viewBox top.
countInColumn := 0.
[(y := y + grid) <= (viewBox height - grid)]
whileTrue:
[topLeft := viewBox left@y.
row := otherFrames select: [:w |
topLeft = w topLeft].
column > 0 ifFalse:
[currentRowLeft := topLeft] ifTrue: [
rowLeft := ((otherFrames
collect: [:w | w right]) take: column) last + grid.
currentRowLeft := topLeft
translateBy: (rowLeft @ 0).
row := otherFrames
select: [:w | currentRowLeft = w topLeft]].
(viewBox containsPoint: topLeft)
ifTrue: [
row ifEmpty: ["no overlap"
^ topLeft].
countInColumn :=
countInColumn + 1]].
column := column + 1].
y := viewBox top.
[(y := y + grid) <= (viewBox height - grid)]
whileTrue:
[topLeft := viewBox left@y.
free := true.
otherFrames do: [:w | free := free & (topLeft ~= w
topLeft)].
free ifTrue: [^ topLeft]]. "If all else fails..." ^ 0 @ 0!
I often have a huge number of windows open as well.
Yahoo, I'm no longer the only person with so many windows :D
Collapsing all of them is often the only way to bring back sanity :-D
Well said!
--- Sent from Squeak Inbox Talk
On 2023-08-29T23:18:38+02:00, karlramberg@gmail.com wrote:
LOL That gif was awesome
I like that you implemented collapsing windows into several columns. I often have a huge number of windows open as well. Collapsing all of them is often the only way to bring back sanity :-D
Best, Karl
On Tue, Aug 29, 2023 at 9:19 PM Thiede, Christoph < Christoph.Thiede(a)student.hpi.uni-potsdam.de> wrote:
Sometimes you just might be dealing with more windows ... ;-) (Yes, I actually had this situation a few times by now on a 1920x1080 screen.)
https://1drv.ms/i/s!AjILzE17v-mzgaftIh9fIx9ruW1sowU?e=ZgLSZ3
Best, Christoph
*Von:* commits(a)source.squeak.org <commits(a)source.squeak.org> *Gesendet:* Dienstag, 29. August 2023 19:41:30 *An:* squeak-dev(a)lists.squeakfoundation.org *Betreff:* [squeak-dev] The Inbox: System-ct.1424.mcz
Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance
otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel
width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText
extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom <= (viewBox height -
verticalBorderDistance)]
- whileTrue:
- [row := otherFrames select: [:w |
newFrame intersects: w].
- column > 0 ifFalse: [rowFrame :=
newFrame] ifTrue: [
- rowLeft := ((otherFrames
collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame
translateBy: (rowLeft @ 0).
- row := otherFrames
select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame)
ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn :=
countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- 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)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft
currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is
gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded
by 8" aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid) <= (viewBox height - grid)]
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w |
topLeft = w topLeft].
- column > 0 ifFalse:
[currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames
collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft
translateBy: (rowLeft @ 0).
- row := otherFrames
select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft)
ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn :=
countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid) <= (viewBox height - grid)]
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w
topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
On 2023-08-29, at 12:19 PM, Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de wrote:
Sometimes you just might be dealing with more windows ... ;-) (Yes, I actually had this situation a few times by now on a 1920x1080 screen.)
You would have *so* enjoyed the old days of monochrome 640x480 screens and a hundred or more browsers open. I got lucky and scored a monitor able to do an incredible 800x600 in 1987.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Oxymorons: Advanced BASIC
Hi Christoph --
+1 :-)
Best, Marcel Am 29.08.2023 21:20:07 schrieb Thiede, Christoph christoph.thiede@student.hpi.uni-potsdam.de: Sometimes you just might be dealing with more windows ... ;-) (Yes, I actually had this situation a few times by now on a 1920x1080 screen.)
https://1drv.ms/i/s!AjILzE17v-mzgaftIh9fIx9ruW1sowU?e=ZgLSZ3 [https://1drv.ms/i/s!AjILzE17v-mzgaftIh9fIx9ruW1sowU?e=ZgLSZ3]
Best, Christoph Von: commits@source.squeak.org commits@source.squeak.org Gesendet: Dienstag, 29. August 2023 19:41:30 An: squeak-dev@lists.squeakfoundation.org Betreff: [squeak-dev] The Inbox: System-ct.1424.mcz Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz [http://source.squeak.org/inbox/System-ct.1424.mcz]
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame | + grid := 8 px. + verticalBorderDistance := 8 px. + horizontalBorderDistance := 8 px. + - | 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]. + otherFrames sort: [:w | w right] ascending. collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph + ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)] + ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight - 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]]. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [top := viewBox top + verticalBorderDistance. + countInColumn := 0. + [topLeft := viewBox left @ top. + newFrame := topLeft extent: extent. + newFrame bottom <= (viewBox height - verticalBorderDistance)] + whileTrue: + [row := otherFrames select: [:w | newFrame intersects: w]. + column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance. + rowFrame := newFrame translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | rowFrame intersects: w]]. + (viewBox containsRect: rowFrame) ifTrue: [ + row ifEmpty: ["no overlap" + ^ rowFrame]. + countInColumn := countInColumn + 1]. + top := top + grid]. + column := column + 1]. + + "If all else fails... (really too many wins here)" - 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)" aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft | + grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px" - | grid otherFrames y free topLeft viewBox | - grid := 24. "should be mult of 8, since manual move is gridded by 8" aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox]. + otherFrames sort: [:w | w right] ascending. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [y := viewBox top. + countInColumn := 0. + [(y := y + grid) <= (viewBox height - grid)] + whileTrue: + [topLeft := viewBox left@y. + row := otherFrames select: [:w | topLeft = w topLeft]. + column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid. + currentRowLeft := topLeft translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | currentRowLeft = w topLeft]]. + (viewBox containsPoint: topLeft) ifTrue: [ + row ifEmpty: ["no overlap" + ^ topLeft]. + countInColumn := countInColumn + 1]]. + column := column + 1]. + - y := viewBox top. - [(y := y + grid) <= (viewBox height - grid)] - whileTrue: - [topLeft := viewBox left@y. - free := true. - otherFrames do: [:w | free := free & (topLeft ~= w topLeft)]. - free ifTrue: [^ topLeft]]. "If all else fails..." ^ 0 @ 0!
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits@source.squeak.org commits@source.squeak.org: Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame | + grid := 8 px. + verticalBorderDistance := 8 px. + horizontalBorderDistance := 8 px. + - | 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]. + otherFrames sort: [:w | w right] ascending. collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph + ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)] + ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight - 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]]. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [top := viewBox top + verticalBorderDistance. + countInColumn := 0. + [topLeft := viewBox left @ top. + newFrame := topLeft extent: extent. + newFrame bottom + whileTrue: + [row := otherFrames select: [:w | newFrame intersects: w]. + column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance. + rowFrame := newFrame translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | rowFrame intersects: w]]. + (viewBox containsRect: rowFrame) ifTrue: [ + row ifEmpty: ["no overlap" + ^ rowFrame]. + countInColumn := countInColumn + 1]. + top := top + grid]. + column := column + 1]. + + "If all else fails... (really too many wins here)" - top := viewBox top + verticalBorderDistance. - [topLeft := viewBox left @ top. - newFrame := topLeft extent: extent. - newFrame bottom - whileTrue: - [(otherFrames anySatisfy: [:w | newFrame intersects: w]) - ifFalse: ["no overlap" - ^ newFrame]. - top := top + grid]. - "If all else fails... (really to many wins here)" aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft | + grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px" - | grid otherFrames y free topLeft viewBox | - grid := 24. "should be mult of 8, since manual move is gridded by 8" aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox]. + otherFrames sort: [:w | w right] ascending. + + column := 0. + countInColumn := nil. + [countInColumn = 0] + whileFalse: + [y := viewBox top. + countInColumn := 0. + [(y := y + grid) + whileTrue: + [topLeft := viewBox left@y. + row := otherFrames select: [:w | topLeft = w topLeft]. + column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [ + rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid. + currentRowLeft := topLeft translateBy: (rowLeft @ 0). + row := otherFrames select: [:w | currentRowLeft = w topLeft]]. + (viewBox containsPoint: topLeft) ifTrue: [ + row ifEmpty: ["no overlap" + ^ topLeft]. + countInColumn := countInColumn + 1]]. + column := column + 1]. + - y := viewBox top. - [(y := y + grid) - whileTrue: - [topLeft := viewBox left@y. - free := true. - otherFrames do: [:w | free := free & (topLeft ~= w topLeft)]. - free ifTrue: [^ topLeft]]. "If all else fails..." ^ 0 @ 0!
Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org <commits(a)source.squeak.org>: Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
Hi Christoph --
Could you align it column by column then?
Best, Marcel Am 01.09.2023 11:39:20 schrieb christoph.thiede@student.hpi.uni-potsdam.de christoph.thiede@student.hpi.uni-potsdam.de: Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org : Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
Hi Marcel,
is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout? I'm not sure about that ... based on the screenshot I shared, this would reduce the number of collapsed windows that fit onto the screen by >50%. Given that our current docking bar menus are still not scrollable, I would definitely rate maximizing the number of visible windows more important than the clearness of arrangement.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-09-04T11:21:34+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
Could you align it column by column then?
Best, Marcel Am 01.09.2023 11:39:20 schrieb christoph.thiede(a)student.hpi.uni-potsdam.de <christoph.thiede(a)student.hpi.uni-potsdam.de>: Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel(a)hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org : Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
[...] is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout?
Of course not :-) Should not yield massive whitespace. Should look nice. Maybe cut-off excessive window titles. Max. column width maybe ... 15-20% of the screen width? Hmm...
Best, Marcel Am 04.09.2023 13:25:35 schrieb christoph.thiede@student.hpi.uni-potsdam.de christoph.thiede@student.hpi.uni-potsdam.de: Hi Marcel,
is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout? I'm not sure about that ... based on the screenshot I shared, this would reduce the number of collapsed windows that fit onto the screen by >50%. Given that our current docking bar menus are still not scrollable, I would definitely rate maximizing the number of visible windows more important than the clearness of arrangement.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-09-04T11:21:34+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
Could you align it column by column then?
Best, Marcel Am 01.09.2023 11:39:20 schrieb christoph.thiede(a)student.hpi.uni-potsdam.de : Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel(a)hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org : Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
Maybe something like this. Occasional occlusion is okay if the close button is on the left, I think. Not sure...
Best, Marcel
Am 04.09.2023 13:39:46 schrieb Marcel Taeumel marcel.taeumel@hpi.de:
[...] is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout?
Of course not :-) Should not yield massive whitespace. Should look nice. Maybe cut-off excessive window titles. Max. column width maybe ... 15-20% of the screen width? Hmm...
Best, Marcel Am 04.09.2023 13:25:35 schrieb christoph.thiede@student.hpi.uni-potsdam.de christoph.thiede@student.hpi.uni-potsdam.de: Hi Marcel,
is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout? I'm not sure about that ... based on the screenshot I shared, this would reduce the number of collapsed windows that fit onto the screen by >50%. Given that our current docking bar menus are still not scrollable, I would definitely rate maximizing the number of visible windows more important than the clearness of arrangement.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-09-04T11:21:34+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
Could you align it column by column then?
Best, Marcel Am 01.09.2023 11:39:20 schrieb christoph.thiede(a)student.hpi.uni-potsdam.de : Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel(a)hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org : Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
Hmm, that sounds more complicated than the current approach. Sometimes I use many very short labels such as "todo" or "bugs" and then I would like to exploit that saved space. In other situations, long labels are deliberate and help me keep an overview. Another argument is that I value leftmost positions higher than a column layout because the closer collapsed windows come to the center of the screen, the more likely it is that they are hidden by other (non-collapsed) windows. I would prefer not to overengineer this feature. How often do you actually have that many collapsed windows? In my opinion, this is rather a "better than nothing" fallback.
Best,
Christoph
________________________________ Von: Marcel Taeumel via Squeak-dev squeak-dev@lists.squeakfoundation.org Gesendet: Montag, 4. September 2023 13:39:46 An: gettimothy via Squeak-dev Cc: Taeumel, Marcel Betreff: [squeak-dev] Re: The Inbox: System-ct.1424.mcz
[...] is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout?
Of course not :-) Should not yield massive whitespace. Should look nice. Maybe cut-off excessive window titles. Max. column width maybe ... 15-20% of the screen width? Hmm...
Best, Marcel
Am 04.09.2023 13:25:35 schrieb christoph.thiede@student.hpi.uni-potsdam.de christoph.thiede@student.hpi.uni-potsdam.de:
Hi Marcel,
is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout? I'm not sure about that ... based on the screenshot I shared, this would reduce the number of collapsed windows that fit onto the screen by >50%. Given that our current docking bar menus are still not scrollable, I would definitely rate maximizing the number of visible windows more important than the clearness of arrangement.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-09-04T11:21:34+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
Could you align it column by column then?
Best, Marcel Am 01.09.2023 11:39:20 schrieb christoph.thiede(a)student.hpi.uni-potsdam.de : Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel(a)hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org : Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
Hi Christoph --
If it is too complicated, then leave it as is and just commit your performance improvement as described :-)
Best, Marcel Am 04.09.2023 15:14:53 schrieb Thiede, Christoph christoph.thiede@student.hpi.uni-potsdam.de: Hmm, that sounds more complicated than the current approach. Sometimes I use many very short labels such as "todo" or "bugs" and then I would like to exploit that saved space. In other situations, long labels are deliberate and help me keep an overview. Another argument is that I value leftmost positions higher than a column layout because the closer collapsed windows come to the center of the screen, the more likely it is that they are hidden by other (non-collapsed) windows. I would prefer not to overengineer this feature. How often do you actually have that many collapsed windows? In my opinion, this is rather a "better than nothing" fallback.
Best, Christoph Von: Marcel Taeumel via Squeak-dev squeak-dev@lists.squeakfoundation.org Gesendet: Montag, 4. September 2023 13:39:46 An: gettimothy via Squeak-dev Cc: Taeumel, Marcel Betreff: [squeak-dev] Re: The Inbox: System-ct.1424.mcz
[...] is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout?
Of course not :-) Should not yield massive whitespace. Should look nice. Maybe cut-off excessive window titles. Max. column width maybe ... 15-20% of the screen width? Hmm...
Best, Marcel Am 04.09.2023 13:25:35 schrieb christoph.thiede@student.hpi.uni-potsdam.de christoph.thiede@student.hpi.uni-potsdam.de: Hi Marcel,
is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout? I'm not sure about that ... based on the screenshot I shared, this would reduce the number of collapsed windows that fit onto the screen by >50%. Given that our current docking bar menus are still not scrollable, I would definitely rate maximizing the number of visible windows more important than the clearness of arrangement.
Best, Christoph
--- Sent from Squeak Inbox Talk
On 2023-09-04T11:21:34+02:00, marcel.taeumel@hpi.de wrote:
Hi Christoph --
Could you align it column by column then?
Best, Marcel Am 01.09.2023 11:39:20 schrieb christoph.thiede(a)student.hpi.uni-potsdam.de : Hi Marcel,
it is still column-by-column. Note that the RealEstateAgent logic makes very few assumptions on the collapsed extent of windows but has its own fixed grid size. So, the algorithm will always minimize the total width of all used columns in total.
Merge? :-)
Best, Christoph
Sent from Squeak Inbox Talk
On 2023-08-30T11:32:24+02:00, marcel.taeumel(a)hpi.de wrote:
Hi Christoph --
If you grow columns and enter the next one, align them vertically so reading those labels becomes easier. ... does it still grow from top to bottom, column-by-column ... or is it row-by-row? Reading those window titles from top to bottom is kind of useful and easier than from left to right....
Best, Marcel Am 29.08.2023 19:41:47 schrieb commits(a)source.squeak.org : Christoph Thiede uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-ct.1424.mcz
==================== Summary ====================
Name: System-ct.1424 Author: ct Time: 29 August 2023, 7:41:28.345934 pm UUID: 9af4e7bf-a99d-8a43-9de5-87c8ed70ce94 Ancestors: System-mt.1423
Revises RealEstateAgent logic for placing collapsed windows to deal with more windows than fit in one column by arranging them next to each other. Speeds up the logic for high-DPI displays by honoring the current scaleFactor.
=============== Diff against System-mt.1423 ===============
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 verticalBorderDistance horizontalBorderDistance otherFrames viewBox collapsedFrame extent top column countInColumn topLeft newFrame row rowLeft rowFrame |
- grid := 8 px.
- verticalBorderDistance := 8 px.
- horizontalBorderDistance := 8 px.
- | 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].
- otherFrames sort: [:w | w right] ascending.
collapsedFrame := aSSView collapsedFrame. extent := collapsedFrame notNil ifTrue: [collapsedFrame extent] ifFalse: [aSSView isMorph
- ifTrue: [aSSView getRawLabel width + aSSView labelWidgetAllowance @ (aSSView labelHeight + 2 px)]
- ifFalse: [(aSSView labelText extent x + 70 px) @ aSSView labelHeight
- 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]].
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [top := viewBox top + verticalBorderDistance.
- countInColumn := 0.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [row := otherFrames select: [:w | newFrame intersects: w].
- column > 0 ifFalse: [rowFrame := newFrame] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + horizontalBorderDistance.
- rowFrame := newFrame translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | rowFrame intersects: w]].
- (viewBox containsRect: rowFrame) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ rowFrame].
- countInColumn := countInColumn + 1].
- top := top + grid].
- column := column + 1].
- "If all else fails... (really too many wins here)"
- top := viewBox top + verticalBorderDistance.
- [topLeft := viewBox left @ top.
- newFrame := topLeft extent: extent.
- newFrame bottom
- whileTrue:
- [(otherFrames anySatisfy: [:w | newFrame intersects: w])
- ifFalse: ["no overlap"
- ^ newFrame].
- top := top + grid].
- "If all else fails... (really to many wins here)"
aSSView isMorph ifTrue:[ Project current showWorldMainDockingBar ifTrue:[^ (0 @ Project current world mainDockingBars first height) extent: extent]]. ^ 0 @ 0 extent: extent!
Item was changed: ----- Method: RealEstateAgent class>>assignCollapsePointFor: (in category 'utilities') ----- assignCollapsePointFor: 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 viewBox column countInColumn y row topLeft currentRowLeft rowLeft |
- grid := 24 px. "should be mult of 8, since manual move is gridded by 8 px"
- | grid otherFrames y free topLeft viewBox |
- grid := 24. "should be mult of 8, since manual move is gridded by 8"
aSSView isMorph ifTrue: [otherFrames := (SystemWindow windowsIn: aSSView world satisfying: [:w | true]) collect: [:w | w collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := self maximumUsableAreaInWorld: aSSView world] ifFalse: [otherFrames := ScheduledControllers scheduledWindowControllers collect: [:aController | aController view collapsedFrame] thenSelect: [:rect | rect notNil]. viewBox := Display boundingBox].
- otherFrames sort: [:w | w right] ascending.
- column := 0.
- countInColumn := nil.
- [countInColumn = 0]
- whileFalse:
- [y := viewBox top.
- countInColumn := 0.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- row := otherFrames select: [:w | topLeft = w topLeft].
- column > 0 ifFalse: [currentRowLeft := topLeft] ifTrue: [
- rowLeft := ((otherFrames collect: [:w | w right]) take: column) last + grid.
- currentRowLeft := topLeft translateBy: (rowLeft @ 0).
- row := otherFrames select: [:w | currentRowLeft = w topLeft]].
- (viewBox containsPoint: topLeft) ifTrue: [
- row ifEmpty: ["no overlap"
- ^ topLeft].
- countInColumn := countInColumn + 1]].
- column := column + 1].
- y := viewBox top.
- [(y := y + grid)
- whileTrue:
- [topLeft := viewBox left(a)y.
- free := true.
- otherFrames do: [:w | free := free & (topLeft ~= w topLeft)].
- free ifTrue: [^ topLeft]].
"If all else fails..." ^ 0 @ 0!
This problem has some commonalities with compacting object space segments, and maybe a look at some of the strategies used for that might provide some useful ideas?
On 2023-09-04, at 4:39 AM, Marcel Taeumel via Squeak-dev squeak-dev@lists.squeakfoundation.org wrote:
[...] is your suggestion to introduce (massive) whitespace for the sake of a clearer column layout?
Of course not :-) Should not yield massive whitespace. Should look nice. Maybe cut-off excessive window titles. Max. column width maybe ... 15-20% of the screen width? Hmm...
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Recedite, plebes! Gero rem imperialem! = Stand aside plebians! I am on imperial business.
squeak-dev@lists.squeakfoundation.org