The Trunk: System-mt.1514.mcz

[email protected] Tue, 16 Jun 2026 09:29:15 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1514.mcz

==================== Summary ====================

Name: System-mt.1514
Author: mt
Time: 16 June 2026, 11:29:13.700747 am
UUID: f5f79260-ab13-6142-a9b7-96880d673371
Ancestors: System-mt.1513

Fix high-DPI issues in ST80 window-placement code.

=============== Diff against System-mt.1513 ===============

Item was changed:
  ----- Method: RealEstateAgent class>>screenTopSetback (in category 'settings') -----
  screenTopSetback
  	Smalltalk isMorphic
  		ifTrue: [^ 0]
+ 		ifFalse: [^ 18 px]!
- 		ifFalse: [^ 18]!

Item was changed:
  ----- Method: RealEstateAgent class>>strictlyStaggeredInitialFrameFor:initialExtent:world: (in category 'framing - private') -----
  strictlyStaggeredInitialFrameFor: aStandardSystemView initialExtent: initialExtent world: aWorld
  	"This method implements a staggered window placement policy that I (di) like.
  	Basically it provides for up to 4 windows, staggered from each of the 4 corners.
  	The windows are staggered so that there will always be a corner visible."
  
  	| allowedArea grid initialFrame otherFrames cornerSel corner delta putativeCorner free maxLevel |
  
  	allowedArea :=(self maximumUsableAreaInWorld: aWorld)
  		insetBy: (self scrollBarSetback @ self screenTopSetback extent: 0@0).
  	"Number to be staggered at each corner (less on small screens)"
  	maxLevel := allowedArea area > 300000 ifTrue: [3] ifFalse: [2].
  	"Amount by which to stagger (less on small screens)"
+ 	grid := allowedArea area > 500000 ifTrue: [40 px] ifFalse: [20 px].
- 	grid := allowedArea area > 500000 ifTrue: [40] ifFalse: [20].
  	initialFrame := 0@0 extent: ((initialExtent
  							"min: (allowedArea extent - (grid*(maxLevel+1*2) + (grid//2))))
  							min: 600@400")).
  	otherFrames := Smalltalk isMorphic
  		ifTrue: [(SystemWindow windowsIn: aWorld satisfying: [:w | w isCollapsed not])
  					collect: [:w | w bounds]]
  		ifFalse: [ScheduledControllers scheduledWindowControllers
  				select: [:aController | aController view ~~ nil]
  				thenCollect: [:aController | aController view isCollapsed
  								ifTrue: [aController view expandedFrame]
  								ifFalse: [aController view displayBox]]].
  	0 to: maxLevel do:
  		[:level | 
  		1 to: 4 do:
  			[:ci | cornerSel := #(topLeft topRight bottomRight bottomLeft) at: ci.
  			corner := allowedArea perform: cornerSel.
  			"The extra grid//2 in delta helps to keep title tabs distinct"
  			delta := (maxLevel-level*grid+(grid//2)) @ (level*grid).
  			1 to: ci-1 do: [:i | delta := delta rotateBy: #right centerAt: 0@0]. "slow way"
  			putativeCorner := corner + delta.
  			free := true.
  			otherFrames do:
  				[:w |
  				free := free & ((w perform: cornerSel) ~= putativeCorner)].
  			free ifTrue:
  				[^ (initialFrame align: (initialFrame perform: cornerSel)
  								with: putativeCorner)
  						 translatedAndSquishedToBeWithin: allowedArea]]].
  	"If all else fails..."
  	^ (self scrollBarSetback @ self screenTopSetback extent: initialFrame extent)
  		translatedAndSquishedToBeWithin: allowedArea!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]