Jump to content

Dark scrollbars when using dark theme


Recommended Posts

Any chance to see dark scrollbars in a future version as they seem more and more supported on Windows 10 (first File Explorer, then cmd line since 1903)?

 

I found this:

 

Quote

After some digging, I was able to find these two approaches. Both are undocumented and may change without notice.

1


SetWindowTheme(hwnd, L"DarkMode_Explorer", NULL);

2


using TYPE_AllowDarkModeForWindow = bool (WINAPI *)(HWND a_HWND, bool a_Allow);
static const TYPE_AllowDarkModeForWindow AllowDarkModeForWindow = (TYPE_AllowDarkModeForWindow)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(133));
AllowDarkModeForWindow(a_HWND, true);
SetWindowTheme(hwnd, L"Explorer", NULL);

WARNING: Ordinal 133 may have completely different API behind it on other versions of Windows, including newer/older Win10 builds.

Both approaches apply some effects, but not everything.
For example, TreeView gets dark scrollbars and dark background for selected item, but the rest of background stays default.

Unfortunately, so far it's not like "call a function and that's it". It seems that even with correct theme applied, some background colors need to be handled manually.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...