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

commits at source.squeak.org commits at source.squeak.org
Mon Mar 14 15:25:12 UTC 2022


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

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

Name: Graphics-mt.499
Author: mt
Time: 14 March 2022, 4:25:03.368786 pm
UUID: e73fbf53-1011-cb4f-877a-7a9f3aeb6b41
Ancestors: Graphics-mt.498

Remove manual line breaks in dialog texts. Keep double-breaks (i.e., '\\' or '<br><br>') as visual gap. Complements Morphic-mt.1935.

=============== Diff against Graphics-mt.498 ===============

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: [
  		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>.<br><br>Do you want to switch to pixel fonts now?' translated format: {(aFloat * 100) rounded}) asTextFromHtml
+ 		title: 'Blurry Fonts Detected' translated) == true
+ 			ifTrue: [UserInterfaceTheme cleanUpAndReset. ^ self uiScaleFactor: 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