Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333002 - Composite#minimumSize ignores clientArea origin
Summary: Composite#minimumSize ignores clientArea origin
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-21 05:49 EST by Ralf Sternberg CLA
Modified: 2011-01-25 16:35 EST (History)
2 users (show)

See Also:


Attachments
A snippet that demonstrates the problem (754 bytes, text/plain)
2010-12-21 05:52 EST, Ralf Sternberg CLA
no flags Details
Screenshot of the snippet on GTK/Linux (4.50 KB, image/png)
2010-12-21 05:53 EST, Ralf Sternberg CLA
no flags Details
Patch that solves the problem (1.06 KB, patch)
2010-12-21 05:54 EST, Ralf Sternberg CLA
no flags Details | Diff

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