Aldaviva / DarkNet

🌓 Enable native Windows dark mode for your WPF and Windows Forms title bars.
https://www.nuget.org/packages/DarkNet/
Apache License 2.0
66 stars 2 forks source link

System wide Light mode does not allow changing the context menu color. #5

Closed Kevin64 closed 1 year ago

Kevin64 commented 1 year ago

Hi, thanks for your work on this library.

I've tested your lib on my WinForms project and, when the system is in dark mode, the contexts menus change correctly inside the program (I have an in-app theme switcher). But when using Windows in light mode, the contexts menus are always light, regardless of the theme setting. I attached some pictures below to demonstrate the issue in your demo. Thanks!

oUiQUTsSm9 wLL5laJvZi 8Qt9xWaoBs JMWdcbVi0t Ce2tuqQTwM vjWMcDEyRK

Aldaviva commented 1 year ago

Hi @Kevin64 ,

Thank you for the helpful report and screenshots. I thought I had tested this scenario, but I will reproduce it and figure out what's going on.

Aldaviva commented 1 year ago

I think I figured it out. Here's an updated library and Forms demo which seem to make the context menus always match the app theme, even when the system theme is Light and the app theme is Dark.

Please give it a quick look and let me know if it works properly for you as well.

Kevin64 commented 1 year ago

Hi man, thanks for the response! I've tested your updated library, and it works correctly now. 😁 Can you update the NuGet package, please?

Aldaviva commented 1 year ago

DarkNet 2.1.1 published on NuGet Gallery.