HolzShots icon indicating copy to clipboard operation
HolzShots copied to clipboard

Support Dark Mode

Open nikeee opened this issue 4 years ago • 8 comments

  • [x] Detect Dark/Light Mode
  • [ ] Add different/mode-aware context menu renderers
  • [ ] Make Plugin Mode-Aware

nikeee avatar Oct 05 '21 23:10 nikeee

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 https://github.com/dotnet/winforms/issues/2543

nikeee avatar Oct 06 '21 23:10 nikeee

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 avatar Oct 08 '21 18:10 nikeee

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 avatar Oct 08 '21 19:10 nikeee

Maybe this helps https://github.com/microsoft/WindowsAppSDK/issues/41

nikeee avatar Oct 08 '21 19:10 nikeee

Not doing this for 2.0.0.

nikeee avatar Oct 08 '21 20:10 nikeee

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.

AraHaan avatar Nov 09 '21 07:11 AraHaan

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 avatar Nov 30 '21 19:11 nikeee

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

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

nikeee avatar Mar 21 '22 00:03 nikeee