Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.939.mcz==================== Summary ====================
Name: Morphic-mt.939
Author: mt
Time: 27 April 2015, 4:04:25.039 pm
UUID: bc209f03-e376-0944-98f9-3c682b8579d2
Ancestors: Morphic-mt.938
Fixed Font Chooser Tool to not assume some particular implementation of their widgets.
=============== Diff against Morphic-mt.938 ===============
Item was changed:
----- Method: FontChooserTool>>buildPreviewPaneWith: (in category 'toolbuilder') -----
buildPreviewPaneWith: builder
"Build the preview panel"
| textSpec |
textSpec := builder pluggableTextSpec new.
textSpec
name: #preview;
model: self;
+ getText: #contents;
+ softLineWrap: false.
- getText: #contents.
^textSpec!
Item was changed:
----- Method: FontChooserTool>>buildWith: (in category 'toolbuilder') -----
buildWith: builder
"Create the ui for the browser"
"ToolBuilder open: self"
| windowSpec |
self offerStyleList ifTrue:[
windowSpec := self buildWindowWith: builder specs: {
(0@0 corner: 0.4@0.4) -> [self buildFontListWith: builder].
(0.4@0 corner: 0.8@0.4) -> [self buildStyleListWith: builder].
(0.8@0 corner: 1.0@0.4) -> [self buildPointSizeListWith: builder].
(0.0@0.4 corner: 1.0@0.88) -> [self buildPreviewPaneWith: builder].
(0.0@0.88 corner: 1@1) -> [self buildButtonBarWith: builder].
}.
] ifFalse:[
windowSpec := self buildWindowWith: builder specs: {
(0@0 corner: 0.7@0.4) -> [self buildFontListWith: builder].
" (0.4@0 corner: 0.8@0.4) -> [self buildStyleListWith: builder]."
(0.7@0 corner: 1.0@0.4) -> [self buildPointSizeListWith: builder].
(0.0@0.4 corner: 1.0@0.8) -> [self buildPreviewPaneWith: builder].
(0.0@0.8 corner: 1@1) -> [self buildButtonBarWith: builder].
}.
].
windowSpec extent: self initialExtent.
window := builder build: windowSpec.
+
+ "Now that the window has been built, notify selection again to scroll it into view."
+ self changed: #selectedFontIndex.
- "Yes, that's a hack. But it looks ugly with line breaks."
- (builder widgetAt: #preview) wrapFlag: false.
- (builder widgetAt: #fontList) scrollSelectionIntoView.
^window!
Item was changed:
----- Method: FontChooserTool>>initialExtent (in category 'initialize') -----
initialExtent
+ ^self offerStyleList ifTrue:[420@300] ifFalse:[320@200].!
- ^self offerStyleList ifTrue:[400@300] ifFalse:[300@200].!