Community
Participate
Working Groups
Created attachment 286097 [details] Bug on Windows On windows the DateTime widget renders with white background even when in the dark theme. On macOS is looks fine. I was not able to test this on linux. You could easily see this with the "Resource Filters" dialog. You can reach that via: Context Menu on a project > Properties > Resource > Resource Filters > Add Filter.
Created attachment 286098 [details] Working on macOS
I have studied 'aero.msstyles' and found matching class 'DatePicker'. Unfortunately, there is no support for Dark Theme yet. I have also studied 'comctl32.dll!CDatePicker::_Paint()' that handles painting. It doesn't seem that anything can be customized there. To summarize, I don't think that this can be solved with reasonable effort.
(In reply to Alexandr Miloslavskiy from comment #2) > I have studied 'aero.msstyles' and found matching class 'DatePicker'. > Unfortunately, there is no support for Dark Theme yet. > > I have also studied 'comctl32.dll!CDatePicker::_Paint()' that handles > painting. It doesn't seem that anything can be customized there. > > To summarize, I don't think that this can be solved with reasonable effort. So you are saying the problem is that the native widget on windows does not support styling?
Right.
(In reply to Alexandr Miloslavskiy from comment #4) > Right. I am not a Windows User. Are there other native UIs that use that widget and have the same issue in the OSes dark mode?
Windows does not yet have any dark theme for native applications. What SWT does is a combination of hacks and workarounds. And DateTime seems to be a particularly difficult case.
(In reply to Alexandr Miloslavskiy from comment #6) > Windows does not yet have any dark theme for native applications. What about https://uk.pcmag.com/migrated-3765-windows-10/122487/how-to-enable-dark-mode-in-windows-10
This only affects Windows Explorer (partially), some Metro-based applications, etc. But there is no dark theme for native applications yet. SWT is based on native applications framework. You can enable Dark Theme setting in Windows and start the very basic Windows Notepad, for example. You'll see it yourself - no dark theme.
(In reply to Alexandr Miloslavskiy from comment #8) > This only affects Windows Explorer (partially), some Metro-based > applications, etc. But there is no dark theme for native applications yet. > SWT is based on native applications framework. > > You can enable Dark Theme setting in Windows and start the very basic > Windows Notepad, for example. You'll see it yourself - no dark theme. Do we have the possibility to add a workaround solution in SWT side for this issue?
As explained in Comment 2, according to my brief analysis, it's not something that can be solved easily, so it's going to require at least some effort. Also, the product I'm working on is not using DateTime, therefore I won't be able to spend time here, sorry.
As of current Win11, there is still no Windows dark theme for 'DatePicker'.