Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362269 - [Eclipse Platform Extensions] Enhance button layout in StringButtonField
Summary: [Eclipse Platform Extensions] Enhance button layout in StringButtonField
Status: CLOSED FIXED
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.7.0   Edit
Assignee: Idrissa Dieng CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 02:50 EDT by Romain Sezestre CLA
Modified: 2021-07-14 02:15 EDT (History)
7 users (show)

See Also:


Attachments
Proposed patch for StringButtonField enhancement (18.13 KB, patch)
2011-10-28 03:06 EDT, Romain Sezestre CLA
idydieng: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Sezestre CLA 2011-10-28 02:50:35 EDT
A specific composite is created in ListButtonsField so that list and buttons can be correctly placed within the parent composite (e.g. wizard page). With this specific composite, it becomes possible to compute the right width of the buttons (not too large, not too thin); computation which is ensured by LayoutUtil.

When trying to create and use StringButtonField, we observe that obtained result is different: button size is not controlled!

I suggest StringButtonField should be enhanced so that an equivalent 'specific composite' is created within the field. It would also allow to be independent from the number of columns of the parent composite (which may cause strange fields alignments and sizes).

In addition, I noticed that test on button style in LayoutUtil was not completely right (it uses exact equal instead of mask comparison).
Comment 1 Romain Sezestre CLA 2011-10-28 03:06:52 EDT
Created attachment 206107 [details]
Proposed patch for StringButtonField enhancement

The proposed attached patch contains the following enhancements:
 ¤ In LayoutUtil:
    * Created new methods to allow clients to specify additional arguments
      (e.g. hgrab and vgrab);
    * Fixed button style check for width computation;
 ¤ Moved 'createSpecificComposite' from ListButtonsField to BasicField so that it is now accessible from both ListButtonsField and StringButtonField;
 ¤ Review the use/setting of GridLayout and GridData in this two fields; 
 ¤ Wrote JavaDoc on modified methods.

I would appreciate your review feedbacks!
Comment 2 Idrissa Dieng CLA 2011-11-08 08:51:41 EST
Applied proposed patch like enhancement description.
Comment 3 Balazs Grill CLA 2021-07-14 02:15:54 EDT
Mass-closing Resolved tickets