Bug 566359

Summary: [Dark theme][win32]- TabFolder header not styled
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, alexandr.miloslavskiy, digga1404, Lars.Vogel, matthias.mailaender, niraj.modi
Version: 4.16Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=508633
https://bugs.eclipse.org/bugs/show_bug.cgi?id=568112
Whiteboard:
Bug Depends on: 568112    
Bug Blocks: 537875, 577357    
Attachments:
Description Flags
Screenshot none

Description Lars Vogel CLA 2020-08-25 04:32:17 EDT
TabFolder are not styled in the dark theme. I assume windows OS supports this by now given that the rest of the widgets supports this.
Comment 1 Lars Vogel CLA 2020-08-25 04:33:21 EDT
Created attachment 283958 [details]
Screenshot
Comment 2 Alexandr Miloslavskiy CLA 2020-08-25 09:40:57 EDT
Unfortunately Win10 doesn't have a native dark theme for TabFolder yet.

I looked into possible workarounds and it seems possible to use a combination of code pieces to get reasonable dark appearance:

Get rid of hardcoded light theme:
	SetWindowTheme(handle, "", "")

Add background color support:
	@Override
	LRESULT WM_ERASEBKGND (long wParam, long lParam) {
		drawBackground (wParam);
		return LRESULT.ONE;
	}

Draw tab items:
	@Override wmDrawChild()
	TCS_OWNERDRAWFIXED style

Drawing tab items will take a bit of effort, but not too much.

We already use a custom made control in our product, so unfortunately I won't be able to spend more time on this.
Comment 3 Alexandr Miloslavskiy CLA 2020-10-22 11:26:39 EDT
It seems that it will be supported by Windows in Oct2020 update, see Bug 568112
Comment 4 Lars Vogel CLA 2020-10-22 12:08:34 EDT
(In reply to Alexandr Miloslavskiy from comment #3)
> It seems that it will be supported by Windows in Oct2020 update, see Bug
> 568112

Awesome to hear!!! Thanks, looking forward to the fix.

(Sorry for not being able to test your Gerrits at the moment)
Comment 5 Niraj Modi CLA 2022-03-02 05:14:46 EST
Quick check: Does Win10/Win11 support this now ?
Comment 6 Alexandr Miloslavskiy CLA 2022-03-06 11:06:51 EST
As of Win11 version 22000.527, there is still no support for dark tab in native theme package (file 'aero.msstyles').

'DarkMode::Tab' style, which was seen in a number of Win10 previews, didn't make it into release version for some reason.
Comment 7 Alexandr Miloslavskiy CLA 2023-04-29 08:10:44 EDT
As of Win11 version 22621.1555, there is still no support for dark tab in native theme package (file 'aero.msstyles').