Dark Mode UI Issues on a (possibly unicorn) Win 10 PC

Hi all,

So there’s something on my main workstation Windows 10 PC which is causing issues with Studio’s “dark mode.” Namely that some UI parts only partially respect the dark color theme and end up with things like white text on white background. I see lots of screenshots from others with DM working properly, and on another Win 10 computer I tried it also works (a lot better, anyway).

I’m wondering if anyone else has run into this, and/or solved it?

I do have “dark” system colors enabled overall, what passes for “dark mode” in Win 10. It’s probably related to some buried Windows theme setting, but for the life of me I can’t figure out what. Also I’m curious if this is just a unicorn issue or if it’s worth perusing a fix for others also.

Some examples… the object list, which pretty much makes DM unusable from a practical standpoint:

The compare tool:

All the g-code editors (I highlighted some text to show it’s actually there):

FWIW Orca has the same issue on this PC, even though I see a few DM fixes over there that aren’t in Studio.

Win 10 is updated as far as it goes. NVIDIA RTX2080 Ti with latest “studio” drivers (and previous versions as well). No NVIDIA apps or other nonsense in the background. I don’t really have issues like this with other programs… they either don’t support any dark mode at all or work as expected if they do.

I’m actually a programmer and have a copy of the Studio code building and working, and have tried a few things to figure out the issue. But so far to no avail, besides learning. If there are any other devs here who might have clues, I’d love to discuss on a coder level. I’ve done homework on the related Win32 API limitations/issues and somewhat how they related to wxWidgets in particular (and that Studio is using an older version of wxW). I’m happy to submit PRs for whatever I can fix. :nerd_face:

TIA!
-Max

I know this doesn’t help you right now, just posted for comparison purposes. This is how it should look normally:

1 Like

The issue has been reported to the Studio developers on GitHub, but it might be helpful to add your report to give it a bump.

OrcaSlicer reportedly found a solution a few weeks ago, available now in the 2.3.2-beta2 release.

Thanks! I did see that but I think it’s a different issue (see below). I’ve also considered, and probably will, open an issue on GitHub, but was curious to see if anyone here has run into it first.

On the Orca fix, do you mean this?

I think you’re right that it fixes the Studio bug reported in the issue you linked, and I had high hopes it would help my issue as well. But sadly, no. :frowning: (Meaning I ported the fix to Studio code, and also tried latest Orca beta.)

-Max

A couple other anomalies, in case it provides any clues…

In the Printer Settings dialog for example there are a couple text entry fields with white backgrounds (and white text), although most of them are colored correctly. See the “X” and “Y” fields (one value is selected to highlight it) vs. the other editable fields below, like “Filament load time.”

There are two more like that in each of the Extruder settings tabs, but otherwise this is an anomaly.

Also all the large text boxes are affected, on all UI pages, just like the “Machine gcode” example I posted in the first round. But same with any other box, like in the “Others” property tab (again, text selected so it is visible):

I’ve compared both to the Studio install on my other PC which works correctly, and neither of those issues appears there.

-Max

Figured it out, yay! :partying_face:

For the archives… I was right that the issue stemmed from a Windows Theme setting. I never used any 3rd party themes or anything like that, but I’ve certainly customized things a lot over the years. And, perhaps critically, this Win 10 install was originally an upgrade from Win 7 (that’s right, almost 2 decades w/out an OS re-install). These theme settings would carry over to a Win 11 upgrade as well, so that could also be affected by the same issue.

Details:
Windows allows you to save your custom themes (background, color, sounds, cursor). These end up as plain-text INI-style configuration files in AppData\Local\Microsoft\Windows\Themes. This has been a feature since Win 7, and carries over to Win 11. The format is documented here: https://learn.microsoft.com/en-us/windows/win32/controls/themesfileformat-overview

In these theme config files there is a [VisualStyles] section which typically specifies an external color scheme, usually from the Aero style. This is also where the system stores the dark/light mode preference. There’s also an optional [Control Panel\Colors] section which specifies “legacy mode” colors for certain UI elements, like scrollbars or borders, etc. This section wasn’t present in any of the default themes, but it was in my custom one (perhaps carried over from Win 7).

The [Control Panel\Colors] section colors are supposed to be ignored if an external color scheme/style is specified. However it seems in some cases they’re not ignored and can still influence some UI elements in some Win32 apps.

Fix:

  1. In Windows’ Settings → Personalization → Themes I saved my current theme so it had a name (“MyTheme”).
  2. Navigated to the AppData\Local\Microsoft\Windows\Themes for my user in Explorer.
  3. Opened the MyTheme.theme file in a plain-text editor (eg. Notepad).
  4. Deleted the whole section which starts with [Control Panel\Colors], up to but not including the next section name below that, if any (all sections start with [...]).
  5. (optional) Found the line in the [Theme] section at the top that starts with DisplayName= and changed the theme name on that line so it was distinct (eg. “MyTheme FIXED”).
  6. Saved the file with a new name, just in case, eg. MyTheme - FIXED.theme.
  7. Went back to the Windows Settings dialog, refreshed the Themes listing by navigating away from that page and back to it, and then selected the new “FIXED” theme version that now shows up (which is why it helps to change the name in step 5).
  8. Restarted Studio.
  9. :raising_hands:

Hope this helps someone down the line. And my eyeballs are so happy.

Cheers,
-Max

1 Like