[Pkg] The Trunk: PreferenceBrowser-ct.152.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jun 16 17:05:34 UTC 2022
Christoph Thiede uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-ct.152.mcz
==================== Summary ====================
Name: PreferenceBrowser-ct.152
Author: ct
Time: 16 June 2022, 7:05:33.772667 pm
UUID: a1dd8bc0-5cf0-964b-a13f-a900c113b501
Ancestors: PreferenceBrowser-ct.151
Increases default width of preference browser to avoid visual glitch when selecting a very wide preference.
Note that this is only a quick-fix and might fail again once you change your screen size or fonts. In the long term, we want to improve the layouting of the PreferenceBrowser instead. See: https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-June/221107.html
=============== 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!
Item was changed:
----- Method: PreferenceBrowser>>initialExtent (in category 'user interface') -----
initialExtent
"Scale here because the receiver is not built through a tool builder. See #buildPluggableWindow:."
+
+ self flag: #workaround. "Avoid overflowing items for the current set of preferences (ct 6/16/2022 14:33). In the future, we want to improve the layouting of the PreferenceBrowser instead. See: https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-June/221107.html"
+ ^ (705 @ 440 * RealEstateAgent scaleFactor) rounded!
-
- ^ (660 at 440 * RealEstateAgent scaleFactor) rounded!
More information about the Packages
mailing list