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

Bug 305864

Summary: [GTK] getItemHeight method of org.eclipse.swt.widgets.List returns a wrong Item height
Product: [Eclipse Project] Platform Reporter: Michael Seele <mseele>
Component: SWTAssignee: Xi Yan <xixiyan>
Status: VERIFIED FIXED QA Contact: Eric Williams <ericwill>
Severity: normal    
Priority: P3 CC: ericwill, lufimtse, peter, xixiyan
Version: 3.5.2Keywords: triaged
Target Milestone: 4.9 M2   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=531884
https://git.eclipse.org/r/124422
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=394f4e7e26c263b24531e4e9007b110e0f35929d
Whiteboard:
Attachments:
Description Flags
screenshot
none
snippet none

Description Michael Seele CLA 2010-03-15 11:13:25 EDT
Created attachment 162051 [details]
screenshot

org.eclipse.swt.widgets.List.getItemHeight() returns a "wrong" item height. The height is smaller than the normal height.
Please see the attached screenshot & snippet.
On the screenshot i overlay the snippet with the results of ListItemSnippet.getBounds & ListItemSnippet.getRealBounds.
getBounds uses getItemHeight to calculate the bounds and getRealBounds uses native methods.
Comment 1 Michael Seele CLA 2010-03-15 11:17:22 EDT
Created attachment 162052 [details]
snippet

Tested under CentOS (gtk 2.10.0) and Ubuntu (gtk 2.18.3)
Comment 2 Eric Williams CLA 2018-05-14 13:33:01 EDT
This is still reproducible on GTK3.22, 4.8 M7, and Fedora 28.
Comment 3 Eclipse Genie CLA 2018-06-12 11:35:08 EDT
New Gerrit change created: https://git.eclipse.org/r/124422
Comment 5 Eric Williams CLA 2018-06-12 14:27:05 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/124422 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=394f4e7e26c263b24531e4e9007b110e0f35929d

In master now, thanks for the patch Xi.
Comment 6 Xi Yan CLA 2018-06-12 14:28:42 EDT
*** Bug 531884 has been marked as a duplicate of this bug. ***