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

commits at source.squeak.org commits at source.squeak.org
Thu Dec 30 16:43:14 UTC 2021


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

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

Name: System-mt.1274
Author: mt
Time: 30 December 2021, 5:43:11.303026 pm
UUID: 05fbd735-bfd5-f74c-9205-2d7835c12f88
Ancestors: System-mt.1273

Fixes a minor glitch with themes not applying correctly when using scale factors with pre-rendered fonts (i.e., 100%, 125%, 150%).

=============== Diff against System-mt.1273 ===============

Item was changed:
  ----- Method: UserInterfaceTheme>>setScaleFactor: (in category 'private - display scale') -----
  setScaleFactor: aFloat
  	"Private. Use #applyScaled:. In the receiver, change the fonts to have a scale of aFloat. Change all fonts to be TrueType fonts if no pre-rendered fonts exist. Never change the 100% reference theme but make a copy. Apply the receiver to the system."
  
  	(self isTTCBased not and: [aFloat = self localScaleFactor])
+ 		ifTrue: [self apply. ^ self].
- 		ifTrue: [self isCurrent ifFalse: [self apply]. ^ self].
  
  	(self isTTCBased not and: [self localScaleFactor = 1.0]) "!!!! Never change the reference theme !!!!"
  		ifTrue: [^ self lookupSimilar ifNil: [self copyWithScaleFactor: aFloat] ifNotNil: [:other | other setScaleFactorPreApply: aFloat]].
  	
  	aFloat = 1.0 ifTrue: [^ self doScale100].
  	aFloat = 1.25 ifTrue: [^ self doScale125].
  	aFloat = 1.5 ifTrue: [^ self doScale150].
  
  	"And now transition from the pre-rendered world into the TrueType world. Or re-use an existing TrueType-based theme with new values. See #lookupSimilar above."
  	TextStyle pixelsPerInch: 96.0 * RealEstateAgent scaleFactor "current, based on pixels".
  	self makeTTCBased.
  	self applyAfter: [TextStyle pixelsPerInch: 96.0 * aFloat "new, not rounded"].!



More information about the Squeak-dev mailing list