Community
Participate
Working Groups
Coolbar height comes up wrong on Windows XP when using the Windows XP theme Eclipse workbench looks bad cause the height of a Coolbar is a few pixels greater then it should be. Steps 1) ensure you are using the java manifest file 2) ensure you are using the theme "Windows XP" 3) Launch eclipse
Created attachment 4100 [details] Eclipse workbench - Wrong height for the Coolbar
Created attachment 4101 [details] Eclipse workbench - Right height for the Coolbar
*** Bug 56221 has been marked as a duplicate of this bug. ***
Related to Bug#19773.
On window xp, running with the manifest the ToolBar#computeSize return the height a few pixels larger when it has a DROP_DOWN item, this cause the whole coolBar to look a bit larger than it should be. But there is nothing wrong to be fixed. Closing: platform behavior.
Yes, it's platform behavior - but it's *bogus* platform behavior, and it makes less space for typing in eclipse. We need every pixel <g>. If you look at MS Word, their coolbars are much thinner (yes, I know, they use custom coolbars, but I am just talking about how it looks... it makes eclipse coolbars look fat). Reopening to ask this question: Can we work around the bogus behavior? Can we set the Coolbar height or the ToolItem height or the Toolbar height or the CoolItem height, and just fix it?
import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; public class PR34923 { public static void main(String[] args) { Display display = new Display (); Shell shell = new Shell (); ToolBar bar1 = new ToolBar (shell, SWT.FLAT); ToolItem item = new ToolItem (bar1, SWT.PUSH); item.setText("item1"); item = new ToolItem (bar1, SWT.PUSH); item.setText("item2"); item = new ToolItem (bar1, SWT.PUSH); item.setText("item3"); item = new ToolItem (bar1, SWT.PUSH); item.setText("item4"); ToolBar bar2 = new ToolBar (shell, SWT.FLAT); item = new ToolItem (bar2, SWT.PUSH); item.setText("item1"); item = new ToolItem (bar2, SWT.PUSH); item.setText("item2"); item = new ToolItem (bar2, SWT.PUSH); item.setText("item3"); item = new ToolItem (bar2, SWT.DROP_DOWN); item.setText("item4"); bar1.setLocation(10, 10); bar2.setLocation(10, 70); bar1.pack(); bar2.pack(); //try to force bar2 to have the same size as bar1 //bar2.setSize(bar1.getSize()); System.out.println(bar1.getSize()); System.out.println(bar2.getSize()); shell.open (); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep (); } } display.dispose (); } }
Run the testcase, note how bar2 (which has one drop_down item) is bigger than bar1. Note what happen to bar2 if bar1' size is force to it (widget is clipped). Need to find a way to cause bar2 to resize smaller whitout clipping. Also note that the example has no Coolbar. For me, this is platform behavior, the CoolBar in IE is even fatter than Eclipse's coolbar.
don't forget: you need to run with the manifest file.
I don't see how this problem can block Bug18267. Removing dependency.
See also bug 99984 which has been fixed.
The coolbar is the right size of for the guy inside. With bug 99984 fixed this should be all right now.