Revert from Dark Mode?

  1. 6 months ago

    Brian O

    Jan 2 Pre-Release Testers, Xojo Pro Calgary, AB

    My Application is in dark mode... I want to undo that .. is there a setting within Xojo building for this?
    I can't read my text on windows in dark mode.

    @Brian OBrien Where is that build flag?

    Build Settings -> Shared

  2. Christian S

    Jan 2 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    App.SupportsDarkMode

    But you better check the text color to be correct.

  3. Tim P

    Jan 2 Pre-Release Testers Rochester, NY
    Edited 6 months ago

    If you don't change the text color at all in the IDE it will automagically support Dark Mode.
    Fighting against dark mode is not the way to handle things.

    Edit: Building with the Supports Dark Mode flag off can help for now, but there's no telling how long Apple will allow that plist flag to operate. Should they suddenly decide to remove the ability to disable dark mode your app will be unusable overnight.

  4. Brian O

    Jan 2 Pre-Release Testers, Xojo Pro Calgary, AB

    Where is that build flag?

  5. Tanner L

    is not verified Jan 2 Pre-Release Testers Answer Toronto, Canada

    @Brian OBrien Where is that build flag?

    Build Settings -> Shared

  6. Tim S

    Jan 4 Canterbury, UK

    @Tim P If you don't change the text color at all in the IDE it will automagically support Dark Mode.
    Fighting against dark mode is not the way to handle things.

    Edit: Building with the Supports Dark Mode flag off can help for now, but there's no telling how long Apple will allow that plist flag to operate. Should they suddenly decide to remove the ability to disable dark mode your app will be unusable overnight.

    Are you saying that all apps will thus be forced to be dark mode, that a non-dark-mode app will show in dark mode anyway? Or that one will not be able to un-dark-mode an app?

    Either way, it will be the end of civilisation as we know it.

  7. Dave S

    Jan 4 San Diego, California USA

    What he is probably saying is like all else (32bit vs 64bit for example) ... at some point in the Future... you app must support Dark Mode... (its up to the end user to decide which mode they wish to use)

  8. @Tim S Are you saying that all apps will thus be forced to be dark mode, that a non-dark-mode app will show in dark mode anyway? Or that one will not be able to un-dark-mode an app?

    Either way, it will be the end of civilisation as we know it.

    I don't think that is how it would work. Some apps would work best in Dark Mode but probably toggling games from dark to light or vice versa might not be good. You can always still keep your color schemes a shade away from the extreme white and black to prevent it from toggling if they stop supporting the plist entry

    <key>NSRequiresAquaSystemAppearance</key>
    <string>true</string>

  9. Jason P

    Jan 6 Xojo Inc Texas

    @Edwin L I don't think that is how it would work. Some apps would work best in Dark Mode but probably toggling games from dark to light or vice versa might not be good. You can always still keep your color schemes a shade away from the extreme white and black to prevent it from toggling if they stop supporting the plist entry

    <key>NSRequiresAquaSystemAppearance</key>
    <string>true</string>

    Note what Apple says on this page:

    https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_app?language=objc

  10. Jürg O

    Jan 6 Pre-Release Testers, Xojo Pro
    Edited 6 months ago

    @Jason P Note what Apple says on this page

    Supporting Dark Mode is strongly encouraged.

    That's Xojo's SupportDarkMode=true, resulting in an app that support both light/dark mode.

    Use the NSRequiresAquaSystemAppearance key to opt out temporarily only if you intend to improve your app's Dark Mode support.

    That's what Xojo's SupportDarkMode=false does currently, right?

    If you do not plan to support a dark appearance at all, apply a light appearance to your entire app, as described in Assign a Specific Appearance to Your App.

    And that seems to not be available in Xojo yet - maybe worth a Feature Request?
    The way I understand apple's docs, Xojo should not just have that boolean switch SupportDarkMode, but a way to choose:

    • Supports both Light/Dark Mode (strongly encouraged by Apple)
    • App is entirely/always Light Mode (not planned to support Dark Mode)
    • App is entirely/always Dark Mode (not planned to support Light Mode)

    That would cover the following part of Apple's Docs:

    You may choose which appearance—light or dark—to adopt for your entire app (or for specific views, windows, or popovers).

  11. Dave S

    Jan 6 San Diego, California USA
    Edited 6 months ago

    If you do not plan to support a dark appearance

    That *IS* supported by Xojo as it is what we have been doing up to now

    I do not think Apple is going to force (or even allow) a "DarkMode" only app.... it is/should be up to the end user which mode they use... Meaning there should only be two options to the developer

    • Supports both Light/Dark Mode (encouraged by Apple, selected by the end user)
    • App is entirely/always Light Mode (which is what we have been working with since forever)

or Sign Up to reply!