[squeak-dev] The Trunk: System-tfel.924.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 23 08:32:03 UTC 2017

Tim Felgentreff uploaded a new version of System to project The Trunk:

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

Name: System-tfel.924
Author: tfel
Time: 23 January 2017, 9:31:46.987369 am
UUID: bd501831-ebe7-de41-8860-123b9fafdbc3
Ancestors: System-tfel.923

Update the hack around scaling in UserInterfaceTheme, so the label areas of Windows is resized correctly.

=============== Diff against System-tfel.923 ===============

Item was changed:
  ----- Method: UserInterfaceTheme>>fixFontsAndScaleAround: (in category 'private') -----
  fixFontsAndScaleAround: block
  	"Due to the current situation with fonts and the real-estate manager, this is a small workaround to support theme switching with largely different font sizes."
  	lastScaleFactor ifNil: [lastScaleFactor := RealEstateAgent scaleFactor].
  	"Due to the current font situation, update TextConstants."
  	[	ignoreApply := true.
  		(self get: #standardSystemFont) ifNotNil: [:font | Preferences setSystemFontTo: font].
  		(self get: #standardFixedFont) ifNotNil: [:font | Preferences setFixedFontTo: font].
  	] ensure: [ignoreApply := false].
  	"Apply theme etc."
  	block value.
  	"Due to the current real-estate manager situation, resize all windows. Works only for Morphic projects."
+ 	(RealEstateAgent scaleFactor - lastScaleFactor) abs > 0.1 ifTrue: [
- 	(RealEstateAgent scaleFactor - lastScaleFactor) abs > 0.5 ifTrue: [
  		Project current isMorphic ifTrue: [
  			| scale |
  			scale := RealEstateAgent scaleFactor / lastScaleFactor.
  			Project current world submorphs
  				select: [:ea | ea isSystemWindow]
+ 				thenDo: [:ea |
+ 					ea extent: (ea extent * scale).
+ 					ea layoutChanged.
+ 					ea setFramesForLabelArea]]].
- 				thenDo: [:ea | ea extent: (ea extent * scale)]]].
  	lastScaleFactor := nil.!

More information about the Squeak-dev mailing list