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

commits at source.squeak.org commits at source.squeak.org
Mon Apr 25 08:50:45 UTC 2022


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

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

Name: Morphic-mt.1969
Author: mt
Time: 25 April 2022, 10:50:38.356234 am
UUID: 0455e656-cb7c-5247-8c3e-3a747a82cdf2
Ancestors: Morphic-tpr.1968

Tweak list of scale factors. Only allow to go above 100% if you choose to only show factors relative to the current platform scale factor.

Well, you can still type-in any custom factor but to select the ones with pre-rendered fonts will be more difficult. For example, when the platform recommends 2.0, then 75%, 100%, 125%, and 150% would be 37.5%, 50%, 62.25%, and 75%. Rounding those to 25% steps would work.

=============== Diff against Morphic-tpr.1968 ===============

Item was changed:
  ----- Method: TheWorldMainDockingBar>>scaleFactorsOn: (in category 'submenu - extras') -----
  scaleFactorsOn: menu
  
+ 	| showsRelative presets currentScaleFactor currentPlatformScaleFactor |
+ 	showsRelative := DisplayScreen relativeScaleFactorEnabled.
- 	| presets currentScaleFactor currentPlatformScaleFactor |
  	currentScaleFactor := (Display relativeUiScaleFactor * 100) rounded.
  	currentPlatformScaleFactor := Display platformScaleFactorKnown
  		ifTrue: [(Display platformScaleFactor * 100) rounded].
+ 	showsRelative
+ 		ifFalse: [presets := 75 to: 300 by: 25]
+ 		ifTrue: [presets := 100 to: 200 by: 25].
- 	presets := 75 to: 300 by: 25.
  	
  	presets do: [:scale |
+ 		showsRelative ifFalse: [
+ 			scale = 100 ifTrue: [menu addLine]. "Normal scales."
+ 			scale = 175 ifTrue: [menu addLine]. "TTCFont used after this line..."].
- 		scale = 100 ifTrue: [menu addLine]. "Normal scales."
- 		scale = 175 ifTrue: [menu addLine]. "TTCFont used after this line..."
  		menu addItem: [:item|
  			item
+ 				contents: ('{1}{2}%{3}' format: {
- 				contents: ('{1}{2}%{3}{4}' format: {
  					currentScaleFactor = scale ifTrue: ['<yes>'] ifFalse: ['<no>'].
  					scale.
+ 					showsRelative ifTrue: [''] ifFalse: [
+ 						scale = currentPlatformScaleFactor
+ 							ifTrue: [' (recommended)' translated] ifFalse: ['']] });
- 					DisplayScreen relativeScaleFactorEnabled
- 						ifTrue: ['' "macOS"] ifFalse: [
- 							scale = currentPlatformScaleFactor
- 								ifTrue: [' (recommended)' translated] ifFalse: ['']].
- 					scale = 75 ifTrue: [' (low ppi)' translated] ifFalse: ['']
- 					});
  				target: Display;
  				selector: #relativeUiScaleFactor:;
  				arguments: {scale / 100}]].
  		
  	menu addLine.
  	menu addItem: [:item |
  		item
  			contents: ((presets includes: currentScaleFactor) not ifTrue: ['<yes>' , 'Custom: ' translated, currentScaleFactor, '% ...'] ifFalse: ['<no>' , 'Other scale factor...' translated]);
  			target: self;
  			selector: #chooseCustomScaleFactor].!



More information about the Squeak-dev mailing list