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

Bug 338774

Summary: Alignment of images inside a Table when using TableEditor (GTK)
Product: [Eclipse Project] Platform Reporter: Albert <albert.pikus>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 3.6Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Screenshot of images alignment none

Description Albert CLA 2011-03-03 03:02:17 EST
Created attachment 190240 [details]
Screenshot of images alignment

There seem to be problems regarding TableEditors' horizontal alignment. Namely, I'm setting checkbox buttons OR images to TableItems inside a specified column, depending on some condition. I have a requirement that TableEditors are horizontally aligned inside a cell. So I'm using TableEditor.horizontalAlignment = SWT.CENTER to achieve this. But when running my application with SWT for GTK, TableEditors are not center aligned if I'm setting images too, while on Mac and Windows, editors stay center aligned. On Linux it seems that TableEditors' left side is put on the right side of the Image, as if I would be setting an Image to a cell AND an TableEditor right next to it, which is not the case. My code looks like this:

Table table = new Table(...);

if (condition)
{
	Button button = new Button(table, SWT.CHECK);

	TableEditor editor = new TableEditor(Table table);
	editor.horizontalAlignment = SWT.CENTER;            
	editor.setEditor(button, row, column);
}
else
{
	row.setImage(column, someImage);
}


Is it possible to circumvent this unwanted alignment of TableEditors on GTK?
Comment 1 Eric Williams CLA 2018-05-15 15:53:25 EDT
Do you have a snippet which reproduces this issue?
Comment 2 Eric Williams CLA 2018-06-04 14:51:06 EDT
Closing as there hasn't been a response in awhile. Please re-open this ticket if the issue reproduces on 4.8 and GTK3.22.