Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Dark Mode #83

Open
1 of 3 tasks
nikeee opened this issue Oct 5, 2021 · 8 comments
Open
1 of 3 tasks

Support Dark Mode #83

nikeee opened this issue Oct 5, 2021 · 8 comments

Comments

@nikeee
Copy link
Owner

nikeee commented Oct 5, 2021

  • Detect Dark/Light Mode
  • Add different/mode-aware context menu renderers
  • Make Plugin Mode-Aware
@nikeee
Copy link
Owner Author

nikeee commented Oct 6, 2021

We already have different context menu renderers, based on the current theme. But they actually don't represent something meaningful.

We could use rounded Windows 11-Style menus for that, which we'd have to implment ourselves.

Also, there is dotnet/winforms#2543

@nikeee
Copy link
Owner Author

nikeee commented Oct 8, 2021

The current toolstrip renderer uses the UxTheme data to draw stuff. On Windows 11, it already looks like other okayish legacy menus. However, it does not respect the dark mode.

It would be fine if we'd keep this and just change the Font/Background color depending on the current theme.

We then can dispose our old renderer that is used in the light mode setting.

@nikeee
Copy link
Owner Author

nikeee commented Oct 8, 2021

Then the setting changed, we should react to WM_SETTINGCHANGE. We're not doing this for now, since setting it initially works for us.

@nikeee
Copy link
Owner Author

nikeee commented Oct 8, 2021

Maybe this helps
microsoft/WindowsAppSDK#41

@nikeee
Copy link
Owner Author

nikeee commented Oct 8, 2021

Not doing this for 2.0.0.

@AraHaan
Copy link

AraHaan commented Nov 9, 2021

Wait how did you guys make the context menu renderer using GetThemeSysColor? I been looking into something like this too.

I also need something like this for other controls like TextBox (for background and Text), the Window background, ListView, TreeView, TextBox, Button, Label, LinkLabel (background), etc.

@nikeee
Copy link
Owner Author

nikeee commented Nov 30, 2021

We're using the VisualStyle renderer, which doesn't seem to support dark mode (yet?). It always draws the light version of the control.

@nikeee
Copy link
Owner Author

nikeee commented Mar 21, 2022

There is an article that partly covers this:
https://den.dev/blog/windows-priority-shuffle/

Also:
https://stackoverflow.com/questions/71403685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants