[squeak-dev] The Trunk: Morphic-mt.1947.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 28 09:05:35 UTC 2022


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

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

Name: Morphic-mt.1947
Author: mt
Time: 28 March 2022, 11:05:29.42409 am
UUID: 3d8c8c8f-c37b-e843-bd78-4fe4a1ab32e5
Ancestors: Morphic-ct.1946

Complements System-mt.1331.

=============== Diff against Morphic-ct.1946 ===============

Item was changed:
  ----- Method: BorderedMorph>>displayScaleChangedBy: (in category 'display scale') -----
  displayScaleChangedBy: factor
  	"The system's scale factor has changed. Try to scale the receiver so that it looks nice on the display. See DisplayScreen >> #uiScaleFactor:."
  	
  	self paneMorphs
  		select: [:ea | ea respondsTo: #displayScaleChangedBy:]
  		thenDo: [:ea | ea displayScaleChangedBy: factor].
  	
+ 	self bounds: ((self topLeft * factor) rounded extent: (self extent * factor) rounded).
- 	"Scale my bounds. Is okay even if I am layouted in my owner. Keep the center. If you also change the world bounds, make sure to move the receiver after this."
- 	self bounds: ((self extent * factor) rounded center: self center).
  	
  	self removeGrips; removePaneSplitters.
  	self cellGap: 0.
  	
  	self paneMorphs do: [:ea | ea layoutFrame ifNotNil: [:frame |
  		frame topOffset: (frame topOffset * factor) rounded.
  		frame bottomOffset: (frame bottomOffset * factor) rounded.
  		frame leftOffset: (frame leftOffset * factor) rounded.
  		frame rightOffset: (frame rightOffset * factor) rounded]].
  
  	self wantsGrips ifTrue: [self addGrips].
  	self wantsPaneSplitters ifTrue: [self addPaneSplitters].!

Item was changed:
  ----- Method: MorphicProject>>displayScaleChangedFrom:to: (in category 'display') -----
  displayScaleChangedFrom: oldFactor to: newFactor
  	"Update Morphic-specific geometry. Try to be more efficient than UI theme's #applyUserInterfaceTheme."
  	
  	super displayScaleChangedFrom: oldFactor to: newFactor.
  	
  	"Switching UI themes involves updating geometry for different fonts anyway. Maybe we can speed up this at some point by avoiding to refresh non-geometry properties such as colors."
  	UserInterfaceTheme current
  		basicApply;
+ 		scaleMorphicWorldBy: newFactor / oldFactor;
  		scaleMorphicToolsBy: newFactor / oldFactor.
  !



More information about the Squeak-dev mailing list