[squeak-dev] The Trunk: MorphicExtras-mt.183.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Aug 13 09:46:15 UTC 2016
Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-mt.183.mcz
==================== Summary ====================
Name: MorphicExtras-mt.183
Author: mt
Time: 13 August 2016, 11:46:01.701735 am
UUID: 77716d2d-5f7e-7748-882b-ce302d86fbc5
Ancestors: MorphicExtras-mt.182
Due to popular request, theme the classic ProgressMorph and ProgressBarMorph according to the settings of the system progress bar.
Note that we *do not* (yet) theme all morphs in 'MorphicExtras' but only the ones used for system tools. Those are in 'Morphic'. As for the ProgressMorph, you have to re-create it after you change a theme.
For the future, we plan to refactor SystemProgressMorph, SystemProgressBarMorph, ProgressMorph, and ProgressBarMorph to have a common base class at least. Maybe also add a PluggableProgressMorph and integrate it into ToolBuilder (with specs).
=============== Diff against MorphicExtras-mt.182 ===============
Item was changed:
----- Method: ProgressBarMorph>>initialize (in category 'initialization') -----
initialize
super initialize.
+ self setDefaultParameters.
- progressColor := Color green.
self value: (ValueHolder new contents: 0.0).
lastValue := 0.0!
Item was added:
+ ----- Method: ProgressBarMorph>>setDefaultParameters (in category 'initialization') -----
+ setDefaultParameters
+
+ self
+ borderColor: ((UserInterfaceTheme current get: #borderColor for: SystemProgressBarMorph) ifNil: [Color black]);
+ borderWidth: ((UserInterfaceTheme current get: #borderWidth for: SystemProgressBarMorph) ifNil: [2]);
+ color: ((UserInterfaceTheme current get: #color for: SystemProgressBarMorph) ifNil: [Color white]);
+ progressColor: ((UserInterfaceTheme current get: #barColor for: SystemProgressBarMorph) ifNil: [Color green]).!
Item was changed:
----- Method: ProgressMorph>>initLabelMorph (in category 'initialization') -----
initLabelMorph
+ ^ labelMorph := (StringMorph contents: '')
+ font: ((UserInterfaceTheme current get: #font for: SystemProgressMorph) ifNil: [TextStyle defaultFont]);
+ color: ((UserInterfaceTheme current get: #textColor for: SystemProgressMorph) ifNil: [Color black]);
+ yourself!
- ^ labelMorph := StringMorph contents: '' font: (self fontOfPointSize: 14)!
Item was changed:
----- Method: ProgressMorph>>initProgressMorph (in category 'initialization') -----
initProgressMorph
progress := ProgressBarMorph new.
+ progress borderColor: ((UserInterfaceTheme current get: #borderColor for: SystemProgressBarMorph) ifNil: [Color black]).
+ progress borderWidth: ((UserInterfaceTheme current get: #borderWidth for: SystemProgressBarMorph) ifNil: [1]).
+ progress color: ((UserInterfaceTheme current get: #color for: SystemProgressBarMorph) ifNil: [Color white]).
+ progress progressColor: ((UserInterfaceTheme current get: #barColor for: SystemProgressBarMorph) ifNil: [Color gray]).
- progress borderWidth: 1.
- progress color: Color white.
- progress progressColor: Color gray.
progress extent: 200 @ 15.
!
Item was changed:
----- Method: ProgressMorph>>initSubLabelMorph (in category 'initialization') -----
initSubLabelMorph
+ ^ subLabelMorph := (StringMorph contents: '')
+ font: ((UserInterfaceTheme current get: #font for: PluggableButtonMorph) ifNil: [TextStyle defaultFont]);
+ color: ((UserInterfaceTheme current get: #textColor for: PluggableButtonMorph) ifNil: [Color black]);
+ yourself!
- ^ subLabelMorph := StringMorph contents: '' font: (self fontOfPointSize: 12)!
Item was changed:
----- Method: ProgressMorph>>setupMorphs (in category 'initialization') -----
setupMorphs
| |
self initProgressMorph.
self
layoutPolicy: TableLayout new;
listDirection: #topToBottom;
cellPositioning: #topCenter;
listCentering: #center;
hResizing: #shrinkWrap;
vResizing: #shrinkWrap;
color: Color transparent.
self addMorphBack: self labelMorph.
self addMorphBack: self subLabelMorph.
self addMorphBack: self progress.
+ self borderWidth: ((UserInterfaceTheme current get: #borderWidth for: SystemProgressMorph) ifNil: [2]).
+ self borderColor: ((UserInterfaceTheme current get: #borderColor for: SystemProgressMorph) ifNil: [Color black]).
- self borderWidth: 2.
- self borderColor: Color black.
+ self color: ((UserInterfaceTheme current get: #color for: SystemProgressMorph) ifNil: [Color veryLightGray]).
- self color: Color veryLightGray.
self align: self fullBounds center with: Display boundingBox center
!
More information about the Squeak-dev
mailing list
|