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

commits at source.squeak.org commits at source.squeak.org
Mon Jan 24 10:26:48 UTC 2022


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

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

Name: Morphic-mt.1857
Author: mt
Time: 24 January 2022, 11:26:42.259852 am
UUID: 41abd323-92d1-de45-84fa-86859be987fc
Ancestors: Morphic-mt.1856

Fixes issue where switching between UI themes messed up text field's mono-vs-proportional fonts.

=============== Diff against Morphic-mt.1856 ===============

Item was changed:
  ----- Method: PluggableTextMorph>>setDefaultParameters (in category 'initialization') -----
  setDefaultParameters
  
  	super setDefaultParameters.
  	
+ 	self textMorph textStyle defaultFont hasFixedWidth "mt: Law of Demeter ... Can we rely on text styles to only bundle similar fonts?"
+ 		ifFalse: [self textStyle: (self userInterfaceTheme textStyle ifNil: [TextStyle default])]
+ 		ifTrue: [self textStyle: (self userInterfaceTheme textStyleFixed ifNil: [TextStyle defaultFixed])].
- 	self
- 		font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]);
- 		setTextColor: (self userInterfaceTheme textColor ifNil: [Color black]).
  	
+ 	self setTextColor: (self userInterfaceTheme textColor ifNil: [Color black]).
  	self wrapBorderColor: ((self userInterfaceTheme wrapBorderColorModifier ifNil: [ [:c | c muchLighter alpha: 0.3] ])
  								value: self borderColor).
  	
  	self
  		setProperty: #adornmentReadOnly
  		toValue: (self userInterfaceTheme adornmentReadOnly ifNil: [Color black]);
  		setProperty: #adornmentRefuse
  		toValue: (self userInterfaceTheme adornmentRefuse ifNil: [Color tan]);
  		setProperty: #adornmentConflict
  		toValue: (self userInterfaceTheme adornmentConflict ifNil: [Color red]);
  		setProperty: #adornmentDiff
  		toValue: (self userInterfaceTheme adornmentDiff ifNil: [Color green]);
  		setProperty: #adornmentNormalEdit
  		toValue: (self userInterfaceTheme adornmentNormalEdit ifNil: [Color orange]);
  		setProperty: #adornmentDiffEdit
  		toValue: (self userInterfaceTheme adornmentDiffEdit ifNil: [Color yellow]).
  		
  	self
  		setProperty: #frameAdornmentWidth
  		toValue: (self userInterfaceTheme frameAdornmentWidth ifNil: [1]).
  	
  	textMorph
  		caretColor: (self userInterfaceTheme caretColor ifNil: [Color red]);
  		selectionColor: (self userInterfaceTheme selectionColor ifNil: [TranslucentColor r: 0.0 g: 0.0 b: 0.8 alpha: 0.2]);
  		unfocusedSelectionColor: ((self userInterfaceTheme unfocusedSelectionModifier ifNil: [ [:c | Color gray: 0.9] ])
  			value: textMorph selectionColor).!

Item was changed:
  ----- Method: PluggableTextMorph>>setTextColor: (in category 'model access') -----
  setTextColor: aColor
  	"Set the color of my text to the given color"
  
+ 	self flag: #todo. "See commentary in #font:. Maybe we cant to remove all current TextColor attributes here, too?"
  	textMorph textColor: aColor!



More information about the Squeak-dev mailing list