[Cuis] Font Preferences Change

Ken.Dickey Ken.Dickey at whidbey.com
Thu Aug 27 03:48:04 CDT 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2464-KenD-LayoutTest-KenD.5.cs.st
Type: application/octet-stream
Size: 7012 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20150827/c9a2e255/attachment-0009.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2465-FontResize-KenD-2015Aug27-13h51m-KenD.4.cs.st
Type: application/octet-stream
Size: 7428 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20150827/c9a2e255/attachment-0010.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnsavedChangesTo-Morphic-Misc1-KenD.4.cs.st
Type: application/octet-stream
Size: 11990 bytes
Desc: not available
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20150827/c9a2e255/attachment-0011.obj>


More information about the Cuis mailing list