| Summary: | [RCP] [PerspectiveBar] A large empty area on the top with a perspectivebar on the left | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alessandro Mottadelli <amottadelli> | ||||
| Component: | UI | Assignee: | Boris Bokowski <bokowski> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P4 | CC: | adubrovsky, bokowski, eclipse, emoffatt, gilardig, n.a.edgar, pwebster | ||||
| Version: | 3.1 | Keywords: | helpwanted | ||||
| Target Milestone: | 3.5 RC1 | Flags: | emoffatt:
review+
|
||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 104545 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Alessandro Mottadelli
Rather than setting the current value of the pref, if you override the default value using the mechanism describe here: http://eclipse.org/rcp/faq.html#customPrefs does it work any better? The problem persists also with the the mechanism described in the FAQ (http://eclipse.org/rcp/faq.html#customPrefs). The problem seems due to the method 'updateLayoutDataForContents()' of class 'WorbenchWindow': if ((getCoolBarVisible() && getWindowConfigurer().getShowCoolBar()) || (getPerspectiveBarVisible() && getWindowConfigurer() .getShowPerspectiveBar())) { defaultLayout.addTrim(topBar, SWT.TOP, null); topBar.setVisible(true); } else { defaultLayout.removeTrim(topBar); topBar.setVisible(false); } The problem dissapears changing these code lines as follows: String perspectiveBarOnTheLeftString=PlatformUI.getPreferenceStore().getString (IWorkbenchPreferenceConstants.DOCK_PERSPECTIVE_BAR); boolean perspectiveBarOnTheLeft=perspectiveBarOnTheLeftString!=null && perspectiveBarOnTheLeftString.equalsIgnoreCase (IWorkbenchPreferenceConstants.LEFT); if ((getCoolBarVisible() && getWindowConfigurer().getShowCoolBar()) || (getPerspectiveBarVisible() && getWindowConfigurer() .getShowPerspectiveBar() && !perspectiveBarOnTheLeft)) { defaultLayout.addTrim(topBar, SWT.TOP, null); topBar.setVisible(true); } else { defaultLayout.removeTrim(topBar); topBar.setVisible(false); } *** Bug 102982 has been marked as a duplicate of this bug. *** Thanks for investigating further. Also need to handle the top left case in the same way. The topBar should only be shown if the coolbar is visible or if the perspective bar is visible and is at top right. Kim, since you're in this area, would you be able to look at this one, and evaluate the risk/benefit for a 3.1.1 fix? This might be related to bug 104545. SWT's default size for empty composites is 64x64 pixels. If I change the two constants as described in bug 104545, the large empty area goes away. Not showing the topBar if it is empty might be safer though. Kim, will this be fixed for 3.1.1? If not, then the Target field should be changed. We will revisit this when SWT addresses bug 104545. A bit old as bugs go but this presumably could now be addressed given that the dependent SWT bug has been fixed. *** Bug 206015 has been marked as a duplicate of this bug. *** hi, since the bug has been fixed in SWT and the wrong coolbar height is still there (Eclipse 3.4.1 !!!!) are there any plans to fix this or is there a workaround? We can try. Marking for M6 because there is no M7 in Bugzilla yet. (In reply to comment #13) > We can try. Marking for M6 because there is no M7 in Bugzilla yet. Moving to M7 now that we have it :-) Created attachment 134691 [details]
patch
This solves the reported problem. We still have other layout problems though.
Eric, can you please have a look at this? If there is any risk involved, then let's not do it at this late stage. Note that the fix in SWT only changed the default size of CoolBar to (0,0) - an empty Composite still ends up with a (64,64) default size. If SWT had fixed bug 104545 for Composite as well, we would not have to do anything on our end. Boris, the last patch doesn't appear to have the 'computeSize' fix in it. Is it already in ? Do we need it? As far as the patch goes I don't see it as very risky. The logic change in 'updateLayoutDataForContents' makes sense and the extra code only gets invoked when the perspective switcher changes sides so it's not a general performance issue. Tested with a modified RCPMail app and it appears to work fine. The transient layout error when it's first docked on the Top/Right we should likely leave for 3.6. (In reply to comment #17) > Boris, the last patch doesn't appear to have the 'computeSize' fix in it. Is it > already in ? Do we need it? It's not in and we don't need it. (Eric was referring to a "fix" attached as a patch to bug 70049). +1, looks good to me. Patch released to HEAD. Verified in I20090507-2000. |