Bug 508033 - Win32: Toolbar ignores foreground color
Summary: Win32: Toolbar ignores foreground color
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows NT
: P3 normal with 2 votes (vote)
Target Milestone: 4.8 M5   Edit
Assignee: Conrad Groth CLA
QA Contact: Niraj Modi CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 528406
  Show dependency tree
 
Reported: 2016-11-23 04:33 EST by Thomas Singer CLA
Modified: 2018-04-17 12:20 EDT (History)
4 users (show)

See Also:


Attachments
Screenshot on Windows 10 (14.27 KB, image/png)
2016-11-23 04:33 EST, Thomas Singer CLA
no flags Details
Snippet (1.52 KB, text/plain)
2016-11-23 04:33 EST, Thomas Singer CLA
no flags Details
ToolBar_DarkTheme_DropDown_Issue (35.15 KB, image/png)
2017-11-07 03:24 EST, Niraj Modi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2016-11-23 04:33:17 EST
Created attachment 265531 [details]
Screenshot on Windows 10

Please run the attached sample. Though a light-gray foreground color has been set, it still shows the default black text color.
Comment 1 Thomas Singer CLA 2016-11-23 04:33:49 EST
Created attachment 265532 [details]
Snippet
Comment 2 Thomas Singer CLA 2016-12-14 07:27:59 EST
See also bug 509220 covering the the selection color of toggle toolbar buttons.
Comment 3 Conrad Groth CLA 2017-01-14 14:16:30 EST
I provided a gerrit patch, that can be reviewed. This patch needs a rebuild of the SWT binaries!
Comment 4 Conrad Groth CLA 2017-05-03 17:13:08 EDT
@Niraj: Can you please have a look at the patch? Although it needs a rebuild of the binaries, the change itself is very small. And it is a further step towards a good dark theme on Windows.
Comment 5 Niraj Modi CLA 2017-05-05 01:26:22 EDT
(In reply to Conrad Groth from comment #4)
> @Niraj: Can you please have a look at the patch? Although it needs a rebuild
> of the binaries, the change itself is very small. And it is a further step
> towards a good dark theme on Windows.
Tentative for 4.7, since CustomDrawing patches need lot of validation/testing, suggest we plan this in next release.
Comment 6 Niraj Modi CLA 2017-11-07 03:24:02 EST
Created attachment 271348 [details]
ToolBar_DarkTheme_DropDown_Issue

(In reply to Conrad Groth from comment #3)
> I provided a gerrit patch, that can be reviewed. This patch needs a rebuild
> of the SWT binaries!

Hi Conrad,
The patch work clean on Windows 64bit and 32bit both.
Largely the behavior look fine to me.
Found one issue with the ToolBar's DropDown arrow which continues to be in black color irrespective on the foreground/background color. IMO, if possible this DropDown triangle should be of the same color as Toolbar foreground.
Please refer attached screen-grab, created using ControlExample.java
Comment 7 Conrad Groth CLA 2017-11-12 16:11:21 EST
(In reply to Niraj Modi from comment #6)
> Created attachment 271348 [details]
> ToolBar_DarkTheme_DropDown_Issue
> ...
> Found one issue with the ToolBar's DropDown arrow which continues to be in
> black color irrespective on the foreground/background color. IMO, if
> possible this DropDown triangle should be of the same color as Toolbar
> foreground.
> Please refer attached screen-grab, created using ControlExample.java

I agree with you. Unfortunately there's no API method for changing that arrow's Color, so that would be more work of custom drawing. As this bug was 'only' about the text Color I would like to move that topic to another ticket.
Comment 8 Niraj Modi CLA 2017-11-17 08:45:03 EST
Hi Conrad,
Targeting for M4 as the latest patch looks good and now works for both 64bit & 32bit setups. Only verified the specified use-case, will test further to confirm if there are no side effects/breakages.
Note: I will be on vacation next week, hence will get back to you after that.

(In reply to Conrad Groth from comment #7)
> (In reply to Niraj Modi from comment #6)
> I agree with you. Unfortunately there's no API method for changing that
> arrow's Color, so that would be more work of custom drawing. As this bug was
> 'only' about the text Color I would like to move that topic to another
> ticket.
Ok, please raise a separate bug for this. Thanks!
Comment 9 Niraj Modi CLA 2017-11-30 12:56:22 EST
Largely patch is good, will do more elaborate testing with Eclipse(self-hosted mode)possible candidate for early M5. Thanks!
Comment 10 Conrad Groth CLA 2017-12-11 06:30:41 EST
(In reply to Niraj Modi from comment #8)
...
> (In reply to Conrad Groth from comment #7)
> > (In reply to Niraj Modi from comment #6)
> > I agree with you. Unfortunately there's no API method for changing that
> > arrow's Color, so that would be more work of custom drawing. As this bug was
> > 'only' about the text Color I would like to move that topic to another
> > ticket.
> Ok, please raise a separate bug for this. Thanks!

see bug 528406
Comment 11 Niraj Modi CLA 2017-12-13 03:58:21 EST
(In reply to Niraj Modi from comment #9)
> Largely patch is good, will do more elaborate testing with
> Eclipse(self-hosted mode)possible candidate for early M5. Thanks!

Tested the latest patch on Win7 both 64bit and 32bit looks good.
Pushed the changes to master via Gerrit, corresponding git commit:
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=aa02710cfd49bf59fc4fcded6a2bbdb9cdfba8bb
Comment 12 Niraj Modi CLA 2017-12-13 04:21:18 EST
Thanks Conrad for your work on this issue, resolving now.
Comment 13 Niraj Modi CLA 2018-01-24 03:51:16 EST
Verified fix in Build id: I20180122-2000 on Win7/Win10.
Comment 14 Aaron Lara CLA 2018-04-17 12:20:01 EDT
I still see the issue with the Toolbar Dropdown in Dark Theme in build 20180315-1217