Bug 84603 - [RCP] [PerspectiveBar] New API or pref to set default perspective bar size
Summary: [RCP] [PerspectiveBar] New API or pref to set default perspective bar size
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement with 8 votes (vote)
Target Milestone: 3.5   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: api, helpwanted
Depends on:
Blocks:
 
Reported: 2005-02-07 13:05 EST by Chris Gross CLA
Modified: 2008-09-16 09:48 EDT (History)
14 users (show)

See Also:


Attachments
Patch proposal for setting the default size via plugin_customization.ini (2.69 KB, patch)
2008-05-21 04:38 EDT, Mark Hoffmann CLA
bokowski: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Gross CLA 2005-02-07 13:05:24 EST
Please add the ability to set the default width/size of the perspective bar.  
This is necessary when you've used the dock on top right preference and 
particularly when you've preloaded the perspective bar (ala Bug 84226).
Comment 1 Nick Edgar CLA 2005-02-07 13:51:46 EST
Michael, do you have any thoughts here?  Either to have it size automatically to
the number of items, or have a (hidden) pref setting for the number of visible
items (assuming that can be predicted).
Comment 2 Michael Van Meekeren CLA 2005-03-29 13:46:13 EST
I like the idea of specifying the number of items to show and have it size to
that automatically.  The default would be 1 item.  

However, the option is only really meaningful when the perspective switcher is
on the top right.
Comment 3 Patrick Paulin CLA 2005-10-21 23:48:29 EDT
I'd like to see this too. My application has 2 perspectives and it would be nice
to show them both on the toolbar. I would like the ability to specify a default
set of perspectives that would display in the toolbar. 

I'm thinking of something like getInitialWindowPerspectiveId, but that returns
an array of perspective ids. Maybe something like getInitialToolbarPerspectiveIds?
Comment 4 Nick Edgar CLA 2006-02-10 00:26:58 EST
See bug 84226 for preloading the perspective bar (separate from sizing).
Comment 5 Gunnar Wagenknecht CLA 2006-03-12 18:49:37 EST
Will this bug also cover perspectives with larger icons? I'm interested in using stylish PNGs with a size of 64x64 pixels for a demo app.
Comment 6 Eric Moffatt CLA 2006-03-13 16:25:13 EST
Once we have the Perspective Switcher 'dumbed down' to work like other trim widgets (i.e. it should simply calculate and return its desired size) then the calculation of what size the right side of the CBanner is should be straightforward.

I'm not sure if we can do exactly what's here with adding API (not gonna happen since the API freeze was M5) but at least we should be able to default the size on an initial (clean) startup (after that the actual position of the CBanner's 'splitter' is stored in the workspace data anyway.

I think that any api changes will have to happen post 3.2...
Comment 7 Gunnar Wagenknecht CLA 2006-03-13 17:34:41 EST
I think a correct default sizing that also takes larger images into account is suitable. The API for sizing it manually can be added post 3.2.
Comment 8 Craig CLA 2007-07-24 02:58:07 EDT
Has this functionality been added to 3.3? I've requested the status of this bug in a similar thread: bug 86771
Comment 9 Sebastian Fuchs CLA 2008-02-05 03:44:59 EST
The mechanism that is invoked on the memento should be opened to clients to initially set the width and / or the perspectives to apear on the bar.
Comment 10 Boris Bokowski CLA 2008-02-05 07:40:51 EST
Would you be able to contribute a patch? See http://wiki.eclipse.org/Platform_UI/How_to_Contribute
Comment 11 Mark Hoffmann CLA 2008-05-21 04:38:31 EDT
Created attachment 101202 [details]
Patch proposal for setting the default size via plugin_customization.ini

Patch proposal for setting the default size via plugin_customization.ini using the preference key org.eclipse.ui/PERSPECTIVE_BAR_SIZE = value
Comment 12 Eric Moffatt CLA 2008-05-21 14:44:47 EDT
I think that this will have to wait until 3.5 since it's an API change...
Comment 13 Eric Moffatt CLA 2008-09-15 16:00:27 EDT
Committed in >20080925. Applied the patch as is.

Note that the patch logic won't allow a specific size < MIN_DEFAULT_WIDTH but since it's 45 I don't think its an issue...

Marking as FIXED, Mark can you test this when M2 comes out and let me know if it's working as advertised?
Comment 14 Eric Moffatt CLA 2008-09-16 09:21:48 EDT
Verified using the debugger in I20080915-1800.

Mark, feel free to post your results to ensure that this is solving your problem.
Comment 15 Eric Moffatt CLA 2008-09-16 09:48:33 EDT
Added attributions...thanks Mark!