| Summary: | False presentation of a control contributed through the org.eclipse.ui.menu extension point | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Adam Lukaszewski <adam.lukaszewski> | ||||||||||||||
| Component: | SWT | Assignee: | Scott Kovatch <skovatch> | ||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | Silenio Quarti <Silenio_Quarti> | ||||||||||||||
| Severity: | normal | ||||||||||||||||
| Priority: | P3 | CC: | eclipse.felipe, prakash, skovatch | ||||||||||||||
| Version: | 3.6 | ||||||||||||||||
| Target Milestone: | 3.7 M2 | ||||||||||||||||
| Hardware: | PC | ||||||||||||||||
| OS: | Mac OS X | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Adam Lukaszewski
Created attachment 176023 [details]
Test project
Created attachment 176024 [details]
Ubuntu 10.04 screenshot
Created attachment 176025 [details]
MAC OS X 10.6 screenshot
Created attachment 176026 [details]
Windows Vista screenshot
You have set the FormData and set it on the button. However, you have not set any layoutdata for the composite itself - and I don't think its possible, as the Composite's parent is ToolBar & you can't set a layout on it.
I think the bug has to do with the default positioning of items in the Toolbar on Mac. Assigning to SWT for comments.
Hello, I don't think that the problem results from the layout that I've set. Even when you add only a button or another control you will see this mismatch in presentation. Anyway I have very often used the toolbar to add a parent composite for additional other controls without any problems. "I think the bug has to do with the default positioning of items in the Toolbar on Mac. Assigning to SWT for comments." I agree with you... Best regards, Adam Does anyone have an idea? regards Can you write a SWT snippet that reproduces the problem ? Are you using cocoa or carbon ? I verified it does happen on Cocoa, but I don't have any immediate suggestions as to what to do about it. The attached test project will work fine for verification. Hi, I have prepared a more compact test case for you (see attachment). Hopefully the snippet will show exactly the same problem as for the plugin-application. The fact is that I have no possibility to instantaneously test the appearance of the toolbar on a MAC. I stumbled upon this problem while I a friend has started my application on his MAC. I have already asked him whether he can test the snippet for me and for some more information about his environment. I will provide the information as soon as possible! Thanks for your effort. Cheers, Adam Created attachment 177108 [details]
Snippet should demonstrate the alignment problem
(In reply to comment #11) > Created an attachment (id=177108) [details] > Snippet should demonstrate the alignment problem In this case the FormLayout is tripping you up. By default they have a top and left margin of 5, so the buttons in the second composite are shifted right and down 5 pixels. Setting the width to 100 forces the second button onto the next line of the layout so you can't see it. I don't think this is related to the original problem, though. On the Mac the dark red Composite is being placed at 37 pixels from the top of the window and the button is being placed at 0, 0 within the Composite, so the button isn't the problem. Not sure about the Composite yet, though. Created attachment 177140 [details]
Fix
Found the problem, but I'm not sure of the fix. On Cocoa ToolBars are emulated, in that they are just NSButtons inside NSViews laid out in a row. When the items are of different sizes, ToolBar.layoutHorizontal() centers each item vertically relative to the tallest item in the toolbar. Win32 has a real toolbar control, so it behaves differently in this case. Looks like GTK has a toolbar control, too. Patch attached, but needs more testing. Fixed > 20100827, using attached patch. |