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,

Thanks, we'll have a look.

Nick





"Cagatay Kavukcuoglu" <cagatayk@xxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
03/02/02 12:46 AM
Please respond to platform-ui-dev

 
        To:     <platform-ui-dev@xxxxxxxxxxx>
        cc: 
        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