Bug 279592 - [CTabItem] height doesn't honor image height
Summary: [CTabItem] height doesn't honor image height
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.3 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 262603
  Show dependency tree
 
Reported: 2009-06-09 06:25 EDT by Benjamin Muskalla CLA
Modified: 2009-07-01 06:08 EDT (History)
0 users

See Also:


Attachments
comparison rwt <> gtk (7.08 KB, image/png)
2009-06-09 06:26 EDT, Benjamin Muskalla CLA
no flags Details
patch (2.87 KB, patch)
2009-06-12 14:57 EDT, Benjamin Muskalla CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2009-06-09 06:25:59 EDT
RAP 1.2RC3

* Set an image on a CTabItem
* CTabitem is not high enough the display the whole image

Snippet
-------------------------------
package entrypoint;

import org.eclipse.rwt.lifecycle.IEntryPoint;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class EntryPoint1 implements IEntryPoint {

	@Override
	public int createUI() {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setLayout(new GridLayout(1, false));

		CTabFolder folder = new CTabFolder(shell, SWT.NONE);
		CTabItem cTabItem = new CTabItem(folder, SWT.CLOSE);
		cTabItem.setText("vfoo");
		cTabItem.setImage(display.getSystemImage(SWT.ICON_ERROR));

		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
		return 0;
	}
}
Comment 1 Benjamin Muskalla CLA 2009-06-09 06:26:55 EDT
Created attachment 138661 [details]
comparison rwt <> gtk

.
Comment 2 Benjamin Muskalla CLA 2009-06-12 14:57:22 EDT
Created attachment 139059 [details]
patch

Suggested patch to update the tabheight when a new image is set
Comment 3 Benjamin Muskalla CLA 2009-07-01 06:08:01 EDT
Fixed in CVS HEAD with the attached patch.