The Trunk: Morphic-kfr.933.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-kfr.933.mcz

commits-2
Karl Ramberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-kfr.933.mcz

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

Name: Morphic-kfr.933
Author: kfr
Time: 26 April 2015, 8:23:50.899 pm
UUID: 7a617d57-7c81-a640-9f49-aea7118f58ec
Ancestors: Morphic-mt.932

Scroll selected font into view

=============== Diff against Morphic-mt.932 ===============

Item was changed:
  ----- Method: FontChooserTool>>buildFontListWith: (in category 'toolbuilder') -----
  buildFontListWith: builder
  "Build the font choosers list of font names"
  | listSpec |
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
+ name: #fontList;
  list: #fontList;
  getIndex: #selectedFontIndex;
  setIndex: #selectedFontIndex:.
  ^listSpec
+ !
- !

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.
  "Yes, that's a hack. But it looks ugly with line breaks."
  (builder widgetAt: #preview) textMorph wrapFlag: false.
+ (builder widgetAt: #fontList) scrollSelectionIntoView.
  ^window!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.933.mcz

marcel.taeumel (old)
Could you please guard that with "Smalltalk isMorphic"?

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.933.mcz

Karl Ramberg
Hi,
ListView implements the same method.
But the #preview line before must be changed for it to work in MVC

I fixed that

Karl

On Sun, Apr 26, 2015 at 9:00 PM, Marcel Taeumel <[hidden email]> wrote:
Could you please guard that with "Smalltalk isMorphic"?

Best,
Marcel



--
View this message in context: http://forum.world.st/The-Trunk-Morphic-kfr-933-mcz-tp4822006p4822018.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.933.mcz

marcel.taeumel (old)
Thanks.

It's not about checking MVC but explicitely thinking of Morphs here. Think of a third front-end that wants to make use of these models. :)

Just try to make no assumptions about the created widgets at all. Only use the tool builder and changed/update.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-kfr.933.mcz

marcel.taeumel (old)
One could either think of extending the toolbuilder specs or working with #changed: here like ObjectExplorer >> buildWith does with expanding the roots.

Best,
Marcel