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

commits at source.squeak.org commits at source.squeak.org
Fri Feb 11 10:13:11 UTC 2022


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

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

Name: System-mt.1308
Author: mt
Time: 11 February 2022, 11:13:07.867944 am
UUID: 771622d4-4536-a848-b9e8-1c3c03579d60
Ancestors: System-mt.1307

Adds a #themePriority to have more control over cache invalidation when switching between UI themes or scale factors.

Also adds a #includesSelector: check for that class-side #applyUserInterfaceTheme, which actually works like class-side #cleanUp:, #startUp:, #shutDown:, or #initialize.

=============== Diff against System-mt.1307 ===============

Item was added:
+ ----- Method: Object class>>themePriority (in category '*System-Preferences') -----
+ themePriority
+ 	"Use this hook to control the order of theme updates. For example, caches that are reused beyond a the scope of a single object should have a higher priority to be called first. Such caches are in TextAction, SHTextStylerST80, and TextDiffBuilder.
+ 	
+ 	We use the process priority model. 10 means low priority and 80 means high priority."
+ 
+ 	^ 0!

Item was added:
+ ----- Method: TextDiffBuilder class>>themePriority (in category 'preferences') -----
+ themePriority
+ 
+ 	^ 60!

Item was changed:
  ----- Method: UserInterfaceTheme>>basicApply (in category 'private') -----
  basicApply
  	"Private. See #apply."
  
+ 	| classes |
+ 	classes := self class clientClassesToReapply. "Keep for fast #includes: check"
+ 	(classes sorted: [:a :b | a themePriority >= b themePriority]) do: [:eachClass |
+ 		(eachClass class includesSelector: #applyUserInterfaceTheme)
+ 			ifTrue: [eachClass applyUserInterfaceTheme]].
- 	self class clientClassesToReapply in: [:cc |
- 		cc do: [:eachClass | eachClass applyUserInterfaceTheme].
  		Cursor wait showWhile: [
  			SystemNavigation default allObjectsDo: [:o |
+ 				((classes includes: o class)
- 				((cc includes: o class)
  					and: [o canApplyUserInterfaceTheme])
+ 						ifTrue: [o applyUserInterfaceTheme]]].!
- 						ifTrue: [o applyUserInterfaceTheme]]]].!



More information about the Squeak-dev mailing list