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

Bug 366246

Summary: [Compatibility] Editor toolbars not rendered with SWT.FLAT
Product: [Eclipse Project] Platform Reporter: Ian Trimble <ian.trimble>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: emoffatt, gheorghe, pwebster, remy.suen
Version: 4.2   
Target Milestone: 4.2 M5   
Hardware: All   
OS: All   
Whiteboard: wtp4x
Bug Depends on:    
Bug Blocks: 361008    
Attachments:
Description Flags
JSF Tools Faces Config Editor toolbar
none
JSF Tools Project Web Page Editor toolbar
none
Plug-In Manifest Editor toolbar
none
GEF examples "Logic Diagram" toolbar none

Description Ian Trimble CLA 2011-12-09 14:50:26 EST
When running WinXP with the classic theme (or at least with the classic style used for buttons), some toolbars render incorrectly while other toolbars are unaffected by changing themes. In some cases, the rendering is just visually different than other toolbars, while in other cases there is also an issue with buttons being rendered with overly-large dimensions.

This can be seen by setting WinXP's theme to classic and using any of these editors (there could be others):
    - JSF Tools Project's Faces Config Editor
    - JSF Tools Project's Web Page Editor
    - Plug-In Manifest Editor
    - GEF examples "Logic Diagram" editor
Comment 1 Remy Suen CLA 2011-12-09 14:51:13 EST
Please attach some screenshots to this bug.
Comment 2 Ian Trimble CLA 2011-12-09 14:52:53 EST
Created attachment 208197 [details]
JSF Tools Faces Config Editor toolbar
Comment 3 Ian Trimble CLA 2011-12-09 14:53:27 EST
Created attachment 208198 [details]
JSF Tools Project Web Page Editor toolbar
Comment 4 Ian Trimble CLA 2011-12-09 14:53:58 EST
Created attachment 208199 [details]
Plug-In Manifest Editor toolbar
Comment 5 Ian Trimble CLA 2011-12-09 14:54:25 EST
Created attachment 208200 [details]
GEF examples "Logic Diagram" toolbar
Comment 6 Paul Webster CLA 2011-12-14 07:49:10 EST
Bogdan, is this late added CoolItem/ToolBars not having their CSS set?  I thought we got an SWT.Skin event for that?

PW
Comment 7 Ian Trimble CLA 2012-01-05 18:56:11 EST
Is there any update available for this issue? This issue will be readily seen in at least one adopter product - some customer shops disable Windows themes or run with the classic theme to get a slight performance boost (so it's claimed).

Thanks,
 - Ian
Comment 8 Remy Suen CLA 2012-01-12 09:48:45 EST
I also see this problem when using the 'Windows Classic' theme on Windows 7.
Comment 9 Bogdan Gheorghe CLA 2012-01-12 11:54:07 EST
I've reproduced this and am looking into it.
Comment 10 Remy Suen CLA 2012-01-13 09:53:46 EST
Bogdan tells me the tool bars are not created with SWT.FLAT.
Comment 11 Bogdan Gheorghe CLA 2012-01-13 10:22:11 EST
On the default "Windows 7 Basic" desktop theme, ToolItems with the FLAT bit set look the same as those with no FLAT bit. Under the "Windows Classic" theme there is an obvious difference.

Looking at the GEF toolbar that gets constructed with Spy, there is no FLAT bit set. Trying the same scenario under 3.x, we are actually using CoolBars with the FLAT bit set.
Comment 12 Remy Suen CLA 2012-01-13 10:47:40 EST
Fix pushed to master.
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f5bc5901f27314ef872ee7b25bb10bb5d8b61e18

Thank you Ian for reporting the bug and Bogdan for assisting with the investigation.
Comment 13 Ian Trimble CLA 2012-01-13 12:10:28 EST
Thanks to all for taking the time to find a solution.
Comment 14 Remy Suen CLA 2012-01-24 12:04:09 EST
Verified with I20120123-2200 on Windows 7 that the GEF example editors are okay.

Ian, please let us know if you see this problem again.
Comment 15 Ian Trimble CLA 2012-01-26 15:23:36 EST
Thanks, I appreciate the work done on this. FWIW, I also just verified that the JSF Tools project editor toolbar contributions are now looking good.

 - Ian