Font Preferences Change

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

Font Preferences Change

KenDickey
Hi Juan,

I have done enough with resizing on Font Preference Change that I would like some feedback.

The basic questions are:
  [1] Does this direction/strategy seem OK?
  [2] Am I breaking (too many) things?
  [3] Better ideas?  Simpler strategy?
  [4] In sum, it it worth while to continue?

In base, when the user changes preferred fonts, the world gets a fontPreferenceChanged message which it sends to its submorphs, who in turn propagate the message to their submorphs and so forth.

Morph>>fontPreferenceChanged
    self submorphsDo: [ :m | m fontPreferenceChanged ]

Windows which do special things (like set up buttons with fixed* layoutSpec fields) do any special processing required.  Morphs which set relations based on some font metric update their fonts/relations.  Windows typically set up button sizes, so need to reset these.  Some morphs recalculate their minimumExtent or reset their fonts.

For example:

InnerListMorph>>fontPreferenceChanged
    super fontPreferenceChanged.
    self font: Preferences standardListFont.

Look at senders of #fontPreferenceChanged for details.


Usage:
  I have two change sets to file in to the base image.  In order, load the *LayoutTest* then the *FontResize*.

If you use the layout editors, load the Morphic-Misc1 package, then the UnsavedChanges* file.


Expect some missed resize cases.  

Thanks in advance for thoughtful comments.

-KenD

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

2464-KenD-LayoutTest-KenD.5.cs.st (9K) Download Attachment
2465-FontResize-KenD-2015Aug27-13h51m-KenD.4.cs.st (9K) Download Attachment
UnsavedChangesTo-Morphic-Misc1-KenD.4.cs.st (16K) Download Attachment
-KenD