Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Patch for constrained part layout

Cagatay,
 
Thank you for the patch.  I have released the changes.  It did not make it into today's integration build, but will be in tonight's nightly build and next Tuesday's integration build.
Please see the PR (10025) for some further comments.
 
Nick
-----platform-ui-dev-admin@xxxxxxxxxxx wrote: -----

To: <platform-ui-dev@xxxxxxxxxxx>
From: "Cagatay Kavukcuoglu" <cagatayk@xxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
Date: 03/02/2002 12:46AM
Subject: [platform-ui-dev] Patch for constrained part layout

Hi,

This is a patch that implements minimum width/height constrained part
layout in a perspective. It is also a fix for bug 10025.

This makes resizing a lot more smarter in the workbench. Every part has
a minimum height and width; views have a minimum height equal to their
titlebars, tab folders' minimum height is height of the tab plus the
current part's title bar, and so on. The bounds calculation takes into
account the whole layout tree at that node, so resizing an editor area
with more than one workbook will respect the minimum dimensions of all
workbooks, or resizing the Projects view in Java Browsing perspective to
its vertical maximum will collapse Packages, Types and Members views to
their title bars.

The generic ratios in IPageLayout.RATIO_MIN/RATIO_MAX are still used to
implement defaults (there are no parts that define minimum width) and to
normalize part dimensions in PageLayout.

I've tested the patch with the latest code in CVS, though it should also
work with latest stable release version.

The drawbacks are either fixable or not significant (I think). Sometimes
(rarely?) I see a part with a minimum height one pixel shorter than it
should be. I think this is because of using truncation instead of
rounding to nearest in bounds calculations from ratios, though I haven't
tested this assumption. Resize performance is still good, though
somewhat slower than the original. Using a layout bounds data structure
would solve this if it is decided to be critical, though current
performance looks quite acceptable to me on my development machine.

Anyway, I won't make this mail longer. I hope this is an acceptable
extension to resizing in workbench.


Cagatay Kavukcuoglu

--CK

Back to the top