Bug 521116 - Jface TableViewer row height not displayed correctly
Summary: Jface TableViewer row height not displayed correctly
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-08-18 08:43 EDT by Borut Terpinc CLA
Modified: 2018-03-20 13:35 EDT (History)
1 user (show)

See Also:


Attachments
Row problem - only GTK-3 (9.97 KB, image/png)
2017-08-18 08:47 EDT, Borut Terpinc CLA
no flags Details
Row problem (45.02 KB, image/png)
2017-08-18 08:48 EDT, Borut Terpinc CLA
no flags Details

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