[squeak-dev] The Trunk: PreferenceBrowser-ct.151.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 16 17:06:16 UTC 2022


Christoph Thiede uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-ct.151.mcz

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

Name: PreferenceBrowser-ct.151
Author: ct
Time: 16 June 2022, 3:46:55.399003 pm
UUID: 17aafcd2-0c6c-3e41-89da-0ac196b3e150
Ancestors: PreferenceBrowser-mt.150

Revises background color of preferences' code texts to ensure readability in all user interface themes. Improves switching of UI themes for an open preference browser.

Thanks to Jaromir (jar) for the bug report!

=============== Diff against PreferenceBrowser-mt.150 ===============

Item was added:
+ ----- Method: PBPreferenceButtonMorph>>applyUserInterfaceTheme (in category 'updating') -----
+ applyUserInterfaceTheme
+ 
+ 	super applyUserInterfaceTheme.
+ 	
+ 	self hasExtraControls
+ 		ifTrue: [self highlightOff; highlightOn]
+ 		ifFalse: [self highlightParametersOff].!

Item was added:
+ ----- Method: PBPreferenceButtonMorph>>hasExtraControls (in category 'extra controls') -----
+ hasExtraControls
+ 
+ 	^ self submorphs size > 1!

Item was changed:
  ----- Method: PBPreferenceButtonMorph>>highlightOff (in category 'highlighting') -----
  highlightOff
+ 	self highlightParametersOff.
- 	self beTransparent.
- 	self label
- 		color: ((UserInterfaceTheme current get: #textColor for: PluggableListMorph) ifNil: [Color black]);
- 		font: ((UserInterfaceTheme current get: #font for: PluggableListMorph) ifNil: [TextStyle defaultFont]).
  	self removeExtraControls.!

Item was changed:
  ----- Method: PBPreferenceButtonMorph>>highlightOn (in category 'highlighting') -----
  highlightOn
  	
+ 	self highlightParametersOn.
- 	self color: ((UserInterfaceTheme current get: #selectionColor for: PluggableListMorph) ifNil: [Color gray alpha: 0.1]).
- 
- 	self label
- 		color: ((UserInterfaceTheme current get: #selectionTextColor for: PluggableListMorph) ifNil: [Color black]);
- 		font: (((UserInterfaceTheme current get: #font for: PluggableListMorph) ifNil: [TextStyle defaultFont])
- 			emphasized: TextEmphasis bold emphasisCode).
  	
  	self addExtraControls.
  	
  	self currentHand newKeyboardFocus: self.!

Item was added:
+ ----- Method: PBPreferenceButtonMorph>>highlightParametersOff (in category 'highlighting') -----
+ highlightParametersOff
+ 
+ 	self beTransparent.
+ 	self label
+ 		color: ((UserInterfaceTheme current get: #textColor for: PluggableListMorph) ifNil: [Color black]);
+ 		font: ((UserInterfaceTheme current get: #font for: PluggableListMorph) ifNil: [TextStyle defaultFont]).!

Item was added:
+ ----- Method: PBPreferenceButtonMorph>>highlightParametersOn (in category 'highlighting') -----
+ highlightParametersOn
+ 
+ 	self color: ((UserInterfaceTheme current get: #selectionColor for: PluggableListMorph) ifNil: [Color gray alpha: 0.1]).
+ 
+ 	self label
+ 		color: ((UserInterfaceTheme current get: #selectionTextColor for: PluggableListMorph) ifNil: [Color black]);
+ 		font: (((UserInterfaceTheme current get: #font for: PluggableListMorph) ifNil: [TextStyle defaultFont])
+ 			emphasized: TextEmphasis bold emphasisCode).!

Item was changed:
  ----- Method: PBPreferenceButtonMorph>>preferenceCodeTextMorph (in category 'extra controls') -----
  preferenceCodeTextMorph
  	| text tm |
  	text := self preferenceCodeText.
  	tm := TextMorph new
  		contents: text;
+ 		backgroundColor: (UserInterfaceTheme current get: #color for: PluggableTextMorph);
  		wrapFlag: true;
  		autoFit: true;
  		hResizing: #spaceFill;
  		vResizing: #shrinkWrap;
  		margins: (5 at 0 corner: 5 at 0);
  		visible: text notEmpty;
  		yourself. "we don't want an empty textmorph showing"
  	^tm!



More information about the Squeak-dev mailing list