Skip to content

Join the Dark Side – Xojo 2018r3 Supports Dark Mode

With the availability of Xojo 2018 Release 3, Xojo now supports macOS Mojave’s new dark mode. This means you can update your own apps to support dark mode and it also means that the Xojo IDE works in dark mode.

To activate dark mode in Mojave, go to System Preferences, click General and select the “dark” appearance. The entire UI will switch to a darker, more muted color scheme which can be easier on the eyes, especially at night.

Here is what the Xojo IDE looks like in dark mode:

In order for your apps to support dark mode you’ll have to rebuild them with Xojo 2018r3 with its support for dark mode. Once you open your project in 2018r3 go to Shared Build Settings and turn on the Supports Dark Mode property:

Note: This property defaults to OFF for existing projects and ON for new projects.

This will automatically cause the Xojo built-in controls to switch to dark mode when you run your app in dark mode on Mojave. Here is Eddie’s Electronics running in dark mode:

For your own graphics and custom controls you may need to update your drawing code so that you use darker colors and icons when in dark mode. There is now a new IsDarkMode global method that you can check to see if your app is running in dark mode so that you can choose a different color or image.

The App.AppearanceChanged event is called when the user switches between light and dark modes or when the accent color changes. You can use this to tell your UI to update or redraw as necessary.

Read more about this change and others coming to Xojo graphics and the IDE in this post. To learn how you can update your apps to work in dark mode, refer to the Dark Mode topic in the documentation.