UserGuide

Dark Mode

From Xojo Documentation

Revision as of 19:22, 17 September 2018 by PLefebvre (talk | contribs) (Created page with "To facilitate the automatic support of Dark Mode in macOS 10.14 Mojave, there are some subtle changes to how default colors work. * Controls whose text defaults to Solid Blac...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

To facilitate the automatic support of Dark Mode in macOS 10.14 Mojave, there are some subtle changes to how default colors work.

  • Controls whose text defaults to Solid Black (&c00000000) will automatically use the system's Text Color (except Label, see below), which changes depending on Light or Dark mode.
  • Controls whose background color defaults to Solid White (&cFFFFFF00) will automatically use the system's Text Background Color, which changes depending on Light or Dark Mode.
  • When painting to a Graphics context (such as in a Canvas), TextColor returns the system Text Color, FillColor returns the system's Window Fill Color and FrameColor now uses the system's Control Color.
  • Labels whose TextColor is set to Solid Black (&c000000) will automatically use the system's Label Color so they automatically match the captions on Checkboxes and Radio buttons and change depending on light/dark mode.

Lastly, there is a new global method called sDarkMode which returns True if the system is running in Dark Mode on macOS Mojave. It currently always returns False on Windows and Linux.