Automatic dark mode on Mac in recent Slicer Preview releases

I’m having some issues with the view properties in today’s Mac preview version 29150. The background and some of the text are dark (see below) with the default Slicer appearance settings. I can fix it by toggling between Slicer and Dark Slicer, but it reverts each time the application is opened.

My OS is Catalina, 10.15.5

The extensions are also not loading in the extension manager, but it from this thread it sounds I may need to wait a few hours?

Interesting that the text “Slicer” in the Style combobox is dark and the “Welcome to Slicer” module text in that combobox is dark as well.

This behavior is working correctly when I toggle between style on Windows and is correct on startup of Slicer as well. There has been some weird things as related to switching style for the DICOM database widget as described here. Maybe there are some additional issues caused by CTK widgets that are messing up how the palette gets propagated down.

Yes, the palette on opening is not the same as the dark Slicer style. If I change the style to dark Slicer the text shows up white as usual. Toggling one more time back to the default Slicer style will revert back to white background/dark text, but I have to do this every time I launch.

Got it. So only on start of Slicer with Dark Slicer specified will it have incorrect text color in some widgets on macOS.

From your screenshot the style is showing as “Slicer” in the combobox, but the palette is dark. Is this dark mode being controlled by macOS? Or is this an error on start where it is setting the “Dark Slicer” style, but showing the incorrect selection in the settings entry as “Slicer” instead of “Dark Slicer”? Are there any issues in the log?

I noticed from my own screenshot that upon changing to “Dark Slicer” the link text in the Feedback section of the Welcome module is incorrect, but upon collapsing/uncollapsing it is then correct. So maybe just an issue with the widget not updating.

It’s the default Slicer style in my screenshot, showing up with dark background and dark text. There’s no settings on my Mac that would effect this. I don’t usually use dark slicer.

So every time I launch with the default Slicer style (not dark Slicer) I am getting dark background/dark text.

And this is a new thing that “Slicer” style shows Dark background? Did it previously look like the following with the regular “Slicer” style with the light color?

Yes, that’s correct. I noticed the dark background/dark text in yesterday’s release for the first time.

I think this corresponds with the macOS factory build using the latest Qt 5.15 version which was built using the macOS 10.14 SDK which brought support for macOS dark mode. @smrolfe Do you have Dark Mode turned on for macOS? If you switch to the light mode in macOS and then launch Slicer with the “Slicer” style is it light again and will toggle just the application dark when switching to “Dark Slicer” style?

Thanks, I did have dark mode turned on for the macOS and the problem resolved when I switched the OS back to light mode. It does look like the issue is tied to that build, if I launch a preview version from 6/6 and the one from today, you can see the difference (both with MacOS in dark mode).

Is it possible to switch to the dark Slicer style when the MacOS set to dark mode? Or alternatively, allow the the Slicer/Dark Slicer setting to override the OS setting? This seems possible within one session, but doesn’t persist.

I think we should let macOS handle the light/dark mode transition and make the Slicer style setting option only available for the other platforms that don’t have system wide controlled dark mode.

From your screenshots of the macOS controlled look, the colors are all a little bit darker than what was defined in “Dark Slicer”. I should probably make it so that on Windows the dark mode looks like what is done automatically on macOS when in dark mode.

1 Like

@smrolfe Could you start Slicer and get screenshots using the “Slicer” style with the macOS dark mode enabled for the “Models” and “Segment Editor” module? There are some additional colors that those screenshots would have to make the “Dark Slicer” match more closely.

These all seem to be standard Qt behavior now. The switch is still manual on Windows, and probably on Linux, too.

We are in quite good shape, we just have to figure out why a few windows and colors are not right, and find a way to make our icons look better in dark mode (and today’s screen resolutions).

Sorry for the delayed response @jamesobutler. I’m attaching the “Models” and “Segment Editor” screenshots. These were taken with macOS in dark mode and “Slicer” style.

Thanks to a lot of work by @jamesobutler, we have now fixed all the known issues (except a few that are entered into the issue tracker). Please enter new bug reports in the issue tracker.

Thanks @jamesobutler and @lassoan, this looks great on my machine. I really like the option for Slicer Light!

The palette for Slicer light has been the standard view on Windows forever while macOS always had something slightly different. I’m glad you’re able to enjoy this same experience now.

As it relates to switching between styles, macOS probably still has some issues so providing issue reports will be helpful for improving it on that platform.

1 Like