[squeak-dev] The Trunk: Graphics-mt.490.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Mar 2 09:18:19 UTC 2022

Marcel Taeumel uploaded a new version of Graphics to project The Trunk:

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

Name: Graphics-mt.490
Author: mt
Time: 2 March 2022, 10:18:11.47176 am
UUID: ca84f705-7a8b-224e-bbd3-5af55bf955be
Ancestors: Graphics-mt.489

Fix typo.

=============== Diff against Graphics-mt.489 ===============

Item was changed:
  ----- Method: DisplayScreen>>uiScaleFactor: (in category 'scale factor') -----
  uiScaleFactor: aFloat
  	"Sets the effective scale factor for the user interface, i.e., all widgets, tools, and windows. The user can override the CurrentScaleFactor recommended by the platform."
  	| oldFactor newFactor |
+ 	(UserInterfaceTheme current canFakeScaleFactor: aFloat) ifTrue: [
- 	(UserInterfaceTheme current canFakeScaleFactor: 0.75) ifTrue: [
  		self flag: #isTTCBased.
  		^ UserInterfaceTheme current applyScaled: aFloat].
  	aFloat = 0.75 ifTrue: [(Project uiManager confirm: ((('You are currently using <b>TrueType fonts</b>. Your requested scale factor of <b>{1}%</b> looks better using pre-rendered <b>pixel fonts</b>.\\Do you want to switch to pixel fonts now?' translated withCRs format: {(aFloat * 100) rounded}) withNoLineLongerThan: 60) copyReplaceAll: String cr with: '<br>') asTextFromHtml title: 'Blurry Fonts Detected' translated) == true
  		ifTrue: [UserInterfaceTheme cleanUpAndReset. ^ self uiScaleFactor: aFloat]].
  	oldFactor := RealEstateAgent scaleFactor. "Use effective, pixel-based factor to account for rounding errors. See #isTTCBased and #uiScaleFactor."
  	newFactor := aFloat max: 0.75.
  	newFactor = oldFactor ifTrue: [^ self].
  	TextStyle pixelsPerInch: 96.0 * aFloat.
  	newFactor := RealEstateAgent resetScaleFactor; scaleFactor. "Again, account for rounding errors."
  	Project current ifNotNil: [:p | p displayScaleChangedFrom: oldFactor to: newFactor].!

More information about the Squeak-dev mailing list