Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338774 - Alignment of images inside a Table when using TableEditor (GTK)
Summary: Alignment of images inside a Table when using TableEditor (GTK)
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux-GTK
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2011-03-03 03:02 EST by Albert CLA
Modified: 2018-06-04 14:51 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot of images alignment (3.03 KB, image/png)
2011-03-03 03:02 EST, Albert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.