Bug 294003

Summary: CoolBar layout enhancements
Product: [Eclipse Project] Platform Reporter: Mike Schrag <mschrag>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse.felipe
Version: 3.5   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=493078
Whiteboard:
Attachments:
Description Flags
alignment, flexible space, and gripper hiding none

Description Mike Schrag CLA 2009-11-02 17:47:46 EST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_1; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9
Build Identifier: 3.5.1 GM

Currently, CoolBar lacks a couple features that could provide for more flexible layout, namely support for CoolItems that are "flexible spaces" (you can see this in a Mac OS X toolbar, where it will grow to fill available space, divided up among all flexible space items) as well as alignment -- if you want to just make a center-alignment coolbar, there's no intrinsic support.

Reproducible: Always
Comment 1 Mike Schrag CLA 2009-11-02 17:48:21 EST
Created attachment 151136 [details]
alignment, flexible space, and gripper hiding
Comment 2 Mike Schrag CLA 2009-11-02 17:50:29 EST
the attached patch is probably not all that useful on its own ... it probably deserves tooling support in jface so that you can specify contributions that are flexible spaces, but this is the underlying support in CoolBar.

this patch also sneaks in one other enhancements, which is that it hides the gripper if there is only one item and one row ... i hate when i see a coolbar that i can't drag around with but the gripper still appears (you can see that in the lower left of a default Eclipse install -- there are no fast views, but it looks like you can still drag around the item)
Comment 3 Felipe Heidrich CLA 2009-11-03 08:56:49 EST
in win32 SWT uses the native control (rebar) to implement CoolBar.

Rebar doesn't have the type of support you are asking.

Sorry, without win32 support we can't add the feature.
Comment 4 Mike Schrag CLA 2009-11-03 09:31:05 EST
bah, humbug :)