Wednesday
Heya,
With the introduction of dark mode on macOS—how can we query if the CAD is in light or dark mode so we can adjust icons, for example? I didn't find any info about that so far, and also no new API function that sounded like it could serve this purpose.
Is it even possible to reload a plugin UI or a different set of icons for it at runtime when the CAD switches from dark to light mode or vice versa?
Cheers,
Johann
Monday
AppearanceManager::GetMode() will tell you if it's dark/light mode.
The API will build 2 sets of icons (light/dark) and switch between them for you - no need for extra code.
Text colour also dynamically changes to suit dark/light mode - so very little required on your part.
Monday - last edited Monday
Thank you!
We do have our own icons for our toolbar—a handcrafted set for light and dark themes, and we compiler our own resources, so no auto-switching of icons takes place. But I already implemented a way for us to support both themes.Do you also know if we get some kind of event when the user switches the mode during runtime? I see there's an event class next to it. Or can Archicad only switch its own mode with a restart of the application?