Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 301887

Summary: [Widgets] packed TableColumns too narrow on Ubuntu
Product: [Eclipse Project] Platform Reporter: Grant Gayed <grant_gayed>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, ericwill, pinnamur, qforce, Silenio_Quarti
Version: 3.6Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
screenshot
none
Fedora 12 screenshot
none
SWT/JFace 3.7.1 on Ubuntu 11.10 none

Description Grant Gayed CLA 2010-02-04 16:14:34 EST

    
Comment 1 Grant Gayed CLA 2010-02-04 16:16:59 EST
Created attachment 158229 [details]
screenshot

- using the latest swt, happens on Ubuntu, works fine on RHEL4
- run the snippet below and note that the right edge of the item texts in the first two columns are clipped, screenshot is attached
- perhaps it's because column separator lines are being lightly drawn?

public static void main(String[] args) {
	Display display = new Display();
	Shell shell = new Shell(display);
	shell.setLayout(new FillLayout());
	final Table table = new Table(shell, SWT.NONE);
	table.setHeaderVisible(true);
	TableColumn column1 = new TableColumn(table, SWT.NONE);
	TableColumn column2 = new TableColumn(table, SWT.NONE);
	TableColumn column3 = new TableColumn(table, SWT.NONE);
	for (int i = 0; i < 10; i++) {
		TableItem item = new TableItem(table, SWT.NONE);
		item.setText(new String[] {"item " + i, "hi", "there"});
	}
	column1.pack();
	column2.pack();
	column3.pack();
	shell.setSize(300, 300);
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) display.sleep();
	}
	display.dispose();
}
Comment 2 Andrew Overholt CLA 2010-02-04 16:22:12 EST
Created attachment 158231 [details]
Fedora 12 screenshot
Comment 3 Praveen CLA 2010-02-11 08:09:06 EST
I could reproduce the problem on Ubuntu. However, the columns are packed correctly when the lines are drawn.
Comment 4 Nam Quang Tran CLA 2011-10-19 05:44:07 EDT
This problems seems to be slightly worse when the table is created with SWT.CHECK style.
Comment 5 Thomas Singer CLA 2011-10-19 06:04:54 EDT
Created attachment 205488 [details]
SWT/JFace 3.7.1 on Ubuntu 11.10
Comment 6 Eric Williams CLA 2017-07-28 09:34:29 EDT
(In reply to Thomas Singer from comment #5)
> Created attachment 205488 [details]
> SWT/JFace 3.7.1 on Ubuntu 11.10

Ping, is this still reproducible?
Comment 7 Thomas Singer CLA 2017-07-31 03:06:32 EDT
The columns are now (tried SWT 4.756 on Ubuntu 16.04.2) large enough to not visually cut off some text. But double-clicking the table-header separators make them slightly larger, though.
Comment 8 Eric Williams CLA 2018-08-23 12:21:29 EDT

*** This bug has been marked as a duplicate of bug 531882 ***