Bug 455526 - Ability to replace the native ScrollBar for Scrollable in SWT
Summary: Ability to replace the native ScrollBar for Scrollable in SWT
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
: 540036 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-17 12:09 EST by Lars Vogel CLA
Modified: 2020-05-18 08:48 EDT (History)
14 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2014-12-17 12:09:49 EST
A common complain with a dark styled Eclipse is that the Scrollbar cannot be styled. I think we could be great if we in platform.ui could register via CSS a custom drawn scrollbar. For an example for such a scrollbar please see http://www.codeaffine.com/2014/12/17/sacrilege-custom-swt-scrollbar/

For this we would need API to register the Scrollbar with widgets based on org.eclipse.swt.widgets.Scrollable.

Would it be able to add API for this? We in platform.ui could use this to register a custom scrollbar for the dark theme.
Comment 1 David Levin CLA 2015-09-17 16:38:11 EDT
Agree with OP.  This UI enhancement would add a lot of value to Eclipse IDE.
Comment 2 Angelo ZERR CLA 2016-01-13 06:15:47 EST
Yes it should be very cool if we could fix bug with scrollbar for dark theme. In 2016, dark theme is very important and used in a lot of IDE (WebStorm, VSCode...).

I would like to improve JSDT dark theme, but I cannot fix the scrollbar problem.

Many thanks for your help!
Comment 3 Lars Vogel CLA 2016-01-13 06:18:52 EST
(In reply to Angelo ZERR from comment #2)
> Yes it should be very cool if we could fix bug with scrollbar for dark
> theme. In 2016, dark theme is very important and used in a lot of IDE
> (WebStorm, VSCode...).
> 
> I would like to improve JSDT dark theme, but I cannot fix the scrollbar
> problem.
> 
> Many thanks for your help!

Not sure how Frank Apple did this but he managed to replace the native scrollbar.

http://www.codeaffine.com/2015/11/18/service-update-for-the-clean-sheet-eclipse-ide-look-and-feel/
Comment 4 Espinosa CZ CLA 2016-01-19 16:40:31 EST
(In reply to Lars Vogel from comment #3)
> Not sure how Frank Apple did this but he managed to replace the native
> scrollbar.
> 
> http://www.codeaffine.com/2015/11/18/service-update-for-the-clean-sheet-
> eclipse-ide-look-and-feel/

Unfortunately it is not a general solution, it works only for SOME controls: for now only trees and tables.

http://www.codeaffine.com/2014/12/17/sacrilege-custom-swt-scrollbar/

Citing:

...But as a generic overlay implementation is not possible at all, for now only trees and tables adapters are available.

The adapter provides access to the table instance by the method FlatScrollBarTable#getTable(). This allows to adapt also to JFace tree- and table-viewers without a problem...
Comment 5 Eric Williams CLA 2018-08-16 15:20:54 EDT
Is this a dup of bug 444560?
Comment 6 Lars Vogel CLA 2018-10-11 05:07:39 EDT
*** Bug 540036 has been marked as a duplicate of this bug. ***
Comment 7 Pierre-Yves Bigourdan CLA 2020-04-19 04:17:15 EDT
(In reply to Eric Williams from comment #5)
> Is this a dup of bug 444560?

Not quite, that bug ended up being solved just by adding support for native dark scrollbars.
Comment 8 Lars Vogel CLA 2020-05-18 08:24:18 EDT
Not necessary anymore, as the native scrollbars in Windows allow to put them into dark mode.
Comment 9 Pierre-Yves Bigourdan CLA 2020-05-18 08:48:30 EDT
Note that the code in https://github.com/fappel/xiliary still works if you need more scrollbar customisation.