SystemTrayMenu icon indicating copy to clipboard operation
SystemTrayMenu copied to clipboard

[Feature] Context menu in dark mode is not dark

Open phanirithvij opened this issue 3 years ago • 3 comments

I would like the context menu to follow the system theme. It is always light as of now

Screenshot

phanirithvij avatar Jan 23 '22 06:01 phanirithvij

@phanirithvij Thank you the feedback!

Yes, we have already noticed that here https://github.com/Hofknecht/SystemTrayMenu/issues/225 but extra issue is ok for that

We are using 'Explorer Shell Context Menu' from CodeProject. At its website we found a bug report related to this issue, but sadly no solution. Only the suggestion for another project called 'Gong Solutions Shell Library' that should work in this case.

https://www.codeproject.com/Articles/22012/Explorer-Shell-Context-Menu?fid=929090&df=90&mpp=25&sort=Position&spc=Relaxed&select=3706303&tid=3706303

Hofknecht avatar Jan 23 '22 08:01 Hofknecht

(copied this point from #225 to here, because #225 itself is solved) related to ShellContextMenu there is also this second minor issue, the context menu of a network root folder does not work 900 context menu network root folder not working

when we change to another solution maybe also check this issue or create then an extra one therefore

Hofknecht avatar Jan 25 '22 16:01 Hofknecht

I found some info that might help with dark theme support for ShellContextMenu.cs

From here..

... the window that owns those menus basically has to have its theme set to Explorer and the undocumented and weirdly working SetPreferredAppMode and AllowDarkModeForWindow called on it and maybe then it has a chance of working. It seems those things appear to skin to dark the menus in File Explorer when owner drawing is disabled...

and more info here and (here)

The most fundamental of the new Windows APIs are SetPreferredAppMode (uxtheme@135), to be called prior to any window creation, and AllowDarkModeForWindow (uxtheme@133), to be called on any Window that intends to use native Windows 10 dark mode support.

chip33 avatar Feb 08 '22 15:02 chip33