Bug 575352

Summary: [win32][dark them] Display.h*Theme methods do not respect dark theme
Product: [Eclipse Project] Platform Reporter: Rolf Theunissen <rolf.theunissen>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: alexandr.miloslavskiy, niraj.modi
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576614
Whiteboard:
Bug Depends on:    
Bug Blocks: 577357    

Description Rolf Theunissen CLA 2021-08-11 02:53:49 EDT
The Display.h*Theme use the hwndMessage handle to obtain theme descriptions. This handle is not marked with AllowDarkModeForWindow nor is a SetWindowTheme with a dark theme set.

I am pretty sure that this must cause some glitches in the dark theme, or there have been made workarounds for these glitches. Also, having global themes for the full display may not be the windows API is intended to be used.

Note that I don't have the intention to fix this myself, just don't have enough knowledge about the win32 APIs.
Comment 1 Alexandr Miloslavskiy CLA 2021-11-10 17:40:21 EST
That's an interesting find, thanks!

Luckily, currently 'Display.hScrollBarTheme' is the only theme that is currently relevant to SWT's Dark Theme. And the only place where it's used is 'Button' with 'SWT.ARROW' style. A rare beast, I imagine, that's why I never noticed it.

I acknowledged this finding, but I think that I'm not ready to take any action here. I'll just wait till it gets in the way of my Dark Theme work.