Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 396316 - [GTK3] Table is not given enough height on preferences File Associations page
Summary: [GTK3] Table is not given enough height on preferences File Associations page
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.3   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 4.3 M6   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 340067
  Show dependency tree
 
Reported: 2012-12-11 14:24 EST by Grant Gayed CLA
Modified: 2013-05-24 09:26 EDT (History)
2 users (show)

See Also:


Attachments
screenshot (88.62 KB, image/jpeg)
2012-12-11 14:24 EST, Grant Gayed CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2012-12-11 14:24:39 EST
Created attachment 224596 [details]
screenshot

- running on Fedora 17
- 4.3M4 test build, observed on both x86 and x86_64

- Window > Preferences
- go to the General - Editors - File Associations page
- the top table on the page is only given two items' worth of height, but should have more
- screenshot is attached
Comment 1 Grant Gayed CLA 2012-12-11 14:55:14 EST
possibly another case of this same problem:

- Window > Preferences
- go to the Ant > Editor > Templates page
- press the New... button
- in the resulting dialog press the Insert Variable... button
  - the content assist window that is shown appears to have the default 64x64 size, but should be larger in both height and width
Comment 2 Arun Thondapu CLA 2013-01-04 09:21:04 EST
Tested with the latest I-build id I20130101-0800, interestingly both the scenarios described above are reproducible on Fedora 17 but not on Ubuntu 12.04 (both 64-bit builds). Still not sure what is causing the difference in behavior though...
Comment 3 Grant Gayed CLA 2013-01-30 12:20:44 EST
Retesting, I still see this with the latest SWT on Ubuntu 12.04 LTS (32-bit).
Comment 4 Silenio Quarti CLA 2013-03-21 12:50:35 EDT
Simple snippet that reproduces the problem. Table.getItemHeight() is wrong when the table is empty.

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.*;


public class Test {
public static void main(String[] args) {
	final Display display = new Display();
	Shell shell = new Shell(display);
	shell.setLayout(new GridLayout(1, false));

	Table table = new Table(shell, SWT.BORDER);
	System.out.println(table.getItemHeight());
	for (int i = 0; i < 4; i++) {
		TableItem item = new TableItem(table, SWT.NONE);
		item.setText("Item" + i);
	}
	System.out.println(table.getItemHeight());

	shell.pack();
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
	display.dispose();
}
}