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

Bug 521116

Summary: Jface TableViewer row height not displayed correctly
Product: [Eclipse Project] Platform Reporter: Borut Terpinc <borut.terpinc>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 4.6Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Row problem - only GTK-3
none
Row problem none

Description Borut Terpinc CLA 2017-08-18 08:43:25 EDT

    
Comment 1 Borut Terpinc CLA 2017-08-18 08:47:36 EDT
Created attachment 269895 [details]
Row problem - only GTK-3
Comment 2 Borut Terpinc CLA 2017-08-18 08:48:12 EDT
Created attachment 269896 [details]
Row problem
Comment 3 Borut Terpinc CLA 2017-08-18 09:05:18 EDT
We are using TableViewer jFace component in our Eclipse RCP application. Since migrating to RHEL7 and Gnome-3 we are experiencing strange behaviour of row height in some cases. 

Row height is not calculated properly so not all row contents is displayed correctly (see attachments). This doesn't occur always but in may times this is the case. 

Sometimes it depends on the number of rows in table, but it is not the rule of thumb. Refreshing the table sometimes creates correct display, but not always. 

But, If we use gnome-tweak-tool to change for ex. the scaling factor or the gnome theme, the problem disappears, until it occurs again. Then the same thing helps.

The problem in "Row problem" attachment also occurs if we force the app. to use GTK-2. (export SWT_GTK3=0)

Looks like SWT-GTK problem.
Comment 4 Eric Williams CLA 2017-08-18 09:13:29 EDT
Hello,

do you have a snippet to reproduce this issue?
Comment 5 Borut Terpinc CLA 2017-08-29 03:34:08 EDT
Isolated snippet is hard create as code is has many dependencies. 
I will try to create a single straightforward code. 

This is somehow connected with the layout. 
We managed to find workaround for row problem with changing the layout of the component. 

We changed the Grid data layout form
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);

to 
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
gd.heightHint = heightHint.

So setting grabExcessVerticalSpace to false fixed the issue.
Comment 6 Eric Williams CLA 2018-03-20 13:35:31 EDT
Probably not a bug in SWT, I'll resolve this ticket for now.