Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 34923 - Coolbar height comes up wrong on Windows XP
Summary: Coolbar height comes up wrong on Windows XP
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 56221 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-13 11:47 EST by Felipe Heidrich CLA
Modified: 2006-05-08 14:10 EDT (History)
2 users (show)

See Also:


Attachments
Eclipse workbench - Wrong height for the Coolbar (27.48 KB, image/jpeg)
2003-03-13 11:51 EST, Felipe Heidrich CLA
no flags Details
Eclipse workbench - Right height for the Coolbar (29.26 KB, image/jpeg)
2003-03-13 11:52 EST, Felipe Heidrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felipe Heidrich CLA 2003-03-13 11:47:16 EST
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
Comment 1 Felipe Heidrich CLA 2003-03-13 11:51:05 EST
Created attachment 4100 [details]
Eclipse workbench - Wrong height for the Coolbar
Comment 2 Felipe Heidrich CLA 2003-03-13 11:52:48 EST
Created attachment 4101 [details]
Eclipse workbench - Right height for the Coolbar
Comment 3 Felipe Heidrich CLA 2004-04-26 16:58:26 EDT
*** Bug 56221 has been marked as a duplicate of this bug. ***
Comment 4 Felipe Heidrich CLA 2004-04-26 17:02:19 EDT
Related to Bug#19773.
Comment 5 Felipe Heidrich CLA 2004-06-28 17:39:28 EDT
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.
Comment 6 Carolyn MacLeod CLA 2004-06-29 00:09:24 EDT
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?
Comment 7 Felipe Heidrich CLA 2004-06-29 15:12:09 EDT
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 ();
}
}
Comment 8 Felipe Heidrich CLA 2004-06-29 15:16:37 EDT
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.
Comment 9 Felipe Heidrich CLA 2004-06-29 15:17:27 EDT
don't forget: you need to run with the manifest file.
Comment 10 Felipe Heidrich CLA 2004-06-29 15:19:27 EDT
I don't see how this problem can block Bug18267. Removing dependency.
Comment 11 Florian Priester CLA 2006-05-07 11:30:15 EDT
See also bug 99984 which has been fixed.
Comment 12 Felipe Heidrich CLA 2006-05-08 14:10:11 EDT
The coolbar is the right size of for the guy inside. With bug 99984 fixed this should be all right now.