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

Bug 252042

Summary: ScrollBar does not follow the platform theme
Product: [Tools] GEF Reporter: Valentin Baciu <valentinbaciu>
Component: GEF-Legacy Draw2dAssignee: Brendan Curran-Johnson <brendanc>
Status: RESOLVED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: ahunter.eclipse, keith.chong.ca
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Valentin Baciu CLA 2008-10-24 14:34:25 EDT
Created attachment 116088 [details]
Screenshot

The Draw2D ScrollBar class looks different than the native platform scroll bars. See the attached screenshot. The screenshot was taken from the WTP XML Schema editor.
Comment 1 Brendan Curran-Johnson CLA 2009-01-30 08:56:09 EST
This problem occurs because the draw2d scrollbar doesn't use native scrollbar widgets, it draws it's own scrollbar from scratch. The scrollbar is actually just 4 clickables and a panel. This makes a number of problems with creating non-generic scrollbars.

Since the components in draw2d are meant to be light weight, none of them match OS look and feel. For instance, Buttons in draw2d are rectangular, not rectangular with rounded corners. This means that making Windows XP Style buttons will first require extending the button class with a rounded button class (a custom border scheme for the buttons would probably be required as well).

The coloring for thumb and the two arrows are based off of SWT's color constants for buttons (SWT does not have any color constants for the pieces of the scrollbar). The colors end up matching any of the Windows Classic Style Color schemes, but doesn't pick up any of the colors from the Windows XP style Color schemes.

Finally, the draw2d components don't watch for style changes--the application has to be reopened for color changes to take effect.

Draw2d is designed to allow custom widgets, so if you really need ScrollBars to match platform theme, your best bet is to extend ScrollBar.