[squeak-dev] A fix for ProportionalSplitterMorph, take 2

David T. Lewis lewis at mail.msen.com
Sat Mar 31 17:32:17 UTC 2018


On Sat, Mar 31, 2018 at 10:47:47AM +0200, St??phane Rollandin wrote:
> Repeat:
> 
> Attached is a fix for ProportionalSplitterMorph.
> 
> Currently, moving a window splitter changes all relevant frame layout
> offsets; fractions are not touched. But offsets are absolute values, in
> pixels, and a frame with a large offset will be badly redimensionned
> when the system window extent is reduced.
> 
> To see this, open a browser, and move the main horizontal splitter way
> up. Then shrink the browser: the code pane will keep a largeish height
> (because of its large vertical offsets), and eventually be moved above
> the browser top.
> 
> To fix this, I propose in the attached changeset to keep track of the
> overall splitter delta, then on #mouseUp to recompute the fractions and
> reset the offsets to the typical small values they have.
> 
> I don't know if I am being clear, but it works... try it.
> 
> (the #balanceOffsets method may possibly be simplified I guess)
> 
> 
> Stef

This looks good to me. I put it in the inbox (Morphic-dtl.1408) in case any
other review is needed. If no objections I'll move it to trunk soon.

Thanks Stef.

Dave



More information about the Squeak-dev mailing list