[FIX] LayoutFix (preliminary; and question)

Jesse Welton jwelton at pacific.mps.ohio-state.edu
Wed Jan 31 16:56:40 UTC 2001


Makes SystemWindows' layout more consistent with generic Morphs'
layout.  From the preamble:

"Changes SystemWindows' pane layouts to be based on just the pane
region, eliminating the need to offset panes by the labelHeight.  This
makes it easier to divide panes as intended, in particular fixing the
layout of the bottom (info) pane of FileContentsBrowsers.  The various
title bar components are placed in a labelArea submorph to minimize
code changes and simplify the layout logic."

What this does *not* do, is fix the inconsistent treatment of
bottomOffset depending on whether or not bottomFraction = 1.  The
problem arises from the fact that bottomOffset and rightOffset are
treated as insets internally, but as offsets in other parts of the
code.  To fix this, I'd have to convert all extant LayoutFrames.
Either all bottomOffsets and rightOffsets should be negated, or they
should be renamed to reflect their use.  How does one go about writing
conversion methods for this?  (In the former case, how could I
identify which LayoutFrames were old, and which were new?  Something
to do with the classVersion?  In the latter case, how would I get the
values of the old bottomOffsets, to store them in the new
bottomInsets?)

I suppose a third option would be to change Morph>>addMorph:fullFrame:
and its senders without changing the internal behavior of LayoutFrame
at all, then putting warnings in the comments to alert the new user
that the "offsets" are really treated as insets.  Somehow, that's just
not as satisfying.

-Jesse

-------------- next part --------------
A non-text attachment was scrubbed...
Name: LayoutFix.1.cs
Type: application/octet-stream
Size: 9185 bytes
Desc: 
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010131/a885aaea/LayoutFix.1.obj


More information about the Squeak-dev mailing list