[squeak-dev] The Trunk: System-mt.1341.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 16 15:01:15 UTC 2022


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1341.mcz

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

Name: System-mt.1341
Author: mt
Time: 16 April 2022, 5:01:11.038988 pm
UUID: 7376680a-5dbc-8c4d-a2d8-29d0dfc56ece
Ancestors: System-mt.1340

Fixes regression in window positioning due to a double-scaling issue.

Thanks to Tom Braun for reporting it!

=============== Diff against System-mt.1340 ===============

Item was changed:
  ----- Method: RealEstateAgent class>>initialFrameAtPointerFor:initialExtent:world: (in category 'framing - private') -----
  initialFrameAtPointerFor: aView initialExtent: scaledExtent world: aWorld
+ 	"Answer the frame for aView so that it's title is under the cursor position. Add an offset so that the user does not click on the close or menu button by accident."
+ 	
+ 	| offset |
+ 	offset := ToolBuilder default windowPadding asPoint
+ 		+ (self defaultIconExtent // 2) "... center on the close button ..."
+ 		+ (self defaultIconExtent x * 2 @ 0). "... move to the right, even beyond menu button if it is on the left ..."
+ 
+ 	offset := (offset * self scaleFactor) truncated.
+ 	
+ 	^ (self currentHand cursorPoint - offset
- 	^(aWorld cursorPoint - (50 at 10)	"puts use with the mouse ptr just to the right of the menu button"
  		extent: scaledExtent)
  			translatedAndSquishedToBeWithin: (self maximumUsableAreaInWorld: aWorld)!

Item was changed:
  ----- Method: RealEstateAgent class>>initialFrameFor:initialExtent:world: (in category 'framing') -----
  initialFrameFor: aView initialExtent: initialExtent world: aWorld
- 	| scaledExtent |
- 	scaledExtent := (initialExtent * self scaleFactor) rounded.
  
  	self placeWindowsAtPointer ifTrue: 
+ 		[^self initialFrameAtPointerFor: aView initialExtent: initialExtent world: aWorld].
- 		[^self initialFrameAtPointerFor: aView initialExtent: scaledExtent world: aWorld].
  
  	^ Preferences reverseWindowStagger
+ 		ifTrue: [self strictlyStaggeredInitialFrameFor: aView initialExtent: initialExtent world: aWorld]
+ 		ifFalse: [self normalInitialFrameFor: aView initialExtent: initialExtent world: aWorld]!
- 		ifTrue: [self strictlyStaggeredInitialFrameFor: aView initialExtent: scaledExtent world: aWorld]
- 		ifFalse: [self normalInitialFrameFor: aView initialExtent: scaledExtent world: aWorld]!

Item was changed:
  ----- Method: RealEstateAgent class>>initialFrameFor:world: (in category 'framing') -----
  initialFrameFor: aView world: aWorld
  	"Find a plausible initial screen area for the supplied view.  See called method."
  
+ 	| scaledExtent |
+ 	scaledExtent := (aView initialExtent * RealEstateAgent scaleFactor) rounded.
+ 	^ self initialFrameFor: aView initialExtent: scaledExtent world: aWorld!
- 	^ self initialFrameFor: aView initialExtent: aView initialExtent world: aWorld!



More information about the Squeak-dev mailing list