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

Bug 333002

Summary: Composite#minimumSize ignores clientArea origin
Product: [Eclipse Project] Platform Reporter: Ralf Sternberg <rsternberg>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, Silenio_Quarti
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
A snippet that demonstrates the problem
none
Screenshot of the snippet on GTK/Linux
none
Patch that solves the problem none

Description Ralf Sternberg CLA 2010-12-21 05:49:34 EST
Composite#minimumSize() relies on the assumption that the clientArea starts at (0, 0), which is not the case on all platforms. If the clientArea has an offset, this offset is currently added to the result of Composite#minimumSize().
Comment 1 Ralf Sternberg CLA 2010-12-21 05:52:50 EST
Created attachment 185622 [details]
A snippet that demonstrates the problem

On GTK/Linux, this snippet leaves some empty space below the button, because on GTK the Group's client area has an offset.
Comment 2 Ralf Sternberg CLA 2010-12-21 05:53:33 EST
Created attachment 185623 [details]
Screenshot of the snippet on GTK/Linux
Comment 3 Ralf Sternberg CLA 2010-12-21 05:54:23 EST
Created attachment 185624 [details]
Patch that solves the problem
Comment 4 Felipe Heidrich CLA 2010-12-21 15:53:23 EST
Silenio, the proposed change makes sense to me. Do you see any problems with it ?

Note that all platforms will need the same change. In fact, I tested the on Windows 7 where the same problem occurs without the patch.
Comment 5 Felipe Heidrich CLA 2010-12-22 11:09:52 EST
Fixed in HEAD

Thank you Ralf