Bug 444560 - [Win32] Support background color for scrollbars

This patch reworks the previous patch to meet the new design that will
cover this and other dark theme tweaks.

New design goals are:
1) Feature can be enabled without reflection in cross-platform
2) Feature can be enabled in run time
   This is the most typical scenario.
   For example, Eclipse and the product I'm working on both select the
   theme after reading application config, which happens after creating
   `Display`.
3) Feature can be configured individually
   Different SWT-based products need different settings to match their
   dark themes best.
4) There's an emergency switch to turn it off without recompiling code
   This can be done using system property:
   org.eclipse.swt.internal.win32.disableCustomThemeTweaks
5) It's more performance-friendly
   Previous approach used system property, which due to (2) needed to be
   re-read every time SWT wanted to know if it's active. (4) would have
   caused two properties to be read. (6) also fits nicely.

Additional changes:
6) Added code that tests whether theme is present. See comment in code.
7) Adjusted names to better indicate that setting has additional side
   effects and is not just about scrollbars.

Change-Id: Ie5bb957452dd4c0602b8c4fe3c32aedcc94a28ac
Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
7 files changed
tree: caf1969fabef63cd3b458ec62202ecafe6e7cf20
  1. bundles/
  2. container/
  3. examples/
  4. features/
  5. local-build/
  6. tests/
  7. .gitignore
  8. CONTRIBUTING
  9. LICENSE
  10. NOTICE
  11. pom.xml
  12. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!