No more Dark Mode in Lazarus 3.99 trunk? lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Shebuka · 2023-10-02 12:21 Hi everyone, I updated both FPC and Lazarus from trunk on 14/06/2023 to the latest trunk and, after updating one package (BGRABitmap) too, I rebuilt the IDE and everything started. But to my surprise, despite the system being in Dark mode, both IDE and our Application were in Light mode and are completely ignoring the system setting. Is this a thing of new trunk versions that I can disable or is it a bug? Lazarus 3.99 285b99cc, FPC 3.3.1 f1317e89 ---------------------------------------------------------------------- marcos-ebm · 2023-10-02 12:42 Are you using metadarkstyle? ---------------------------------------------------------------------- Shebuka · 2023-10-02 15:34 Quote from: marcos-ebm on October 02, 2023, 02:42:57 pmAre you using metadarkstyle? Where do I check this? (edit: google it and it's a package for W10 dark mode, my issue is with macOS where this was already automatic) Keep in mind that I didn't change anything in my code, just updated FPC and Lazarus and suddenly neither my App nor the IDE itself uses the style in system preferences... ---------------------------------------------------------------------- jwdietrich · 2023-10-11 20:51 I have had the same experience after updating macOS Ventura from 13.5 to 13.6. Did you update macOS as well? ---------------------------------------------------------------------- jwdietrich · 2023-10-12 14:24 I just found out that this problem obviously applies to the Intel target only. Compiling on a Mac with an Apple Silicon processor for the x86_64 architecture results in an app that remains in the light theme, irrespective of any settings for the dark theme. If I compile the same source code for the aarch64 architecture the dark mode and the switch between both themes are fully supported. ---------------------------------------------------------------------- jwdietrich · 2023-10-14 07:59 Since this is obviously a bug I have reported an issue in the bug tracker at https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40553. ---------------------------------------------------------------------- Hansaplast · 2024-01-04 13:09 Note: - I see this on Apple Silicon as well, and tested Sonoma and Ventura with Lazarus and FPC from trunk.   Everything seems stuck in Light mode and nothing responds to dark mode change. - Tested Lazarus and FPC trunk on Monterey and there things work as they should. ---------------------------------------------------------------------- jwdietrich · 2024-01-07 17:36 Hansaplastique found a potential fix or at least a good workaround by "downgrading" the minimum macOS deployment version. Adding -WM11.0 or -WM10.14 in the project options seems to resolve the issue. See https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40553 for details. ---------------------------------------------------------------------- Hansaplast · 2024-01-07 19:54 Thank jwdietrich! I was struggling with this issue as well. Glad it works! Note: I suspect it's probably more correct to call it "upgrading".  Seems Lazarus defaults to 10.9 as the minimum macOS version. I suspect, but could be very wrong, that macOS therefor assumes that a binary for macOS 10.9 doesn't know dark or light mode as this was introduced with macOS 10.14. So it doesn't switch to dark mode. Setting the minimum requirement to 10.14 or 11.0 makes, maybe, macOS assume the application is familiar with dark and light mode and therefor changes color. Tip: Add "-WM10.14" to the "Options:" field in the 'Configure "Build Lazarus"' window, this way a rebuild IDE will respond to dark/light mode as well. Suggestion for the devs (please let us know where we can assist): - default build Lazarus for macOS 10.14 - add an option on the Project Options window to set the minimum macOS version, default to 10.14, but leaving the backdoor open for older versions if needed. - add that option in the " Configure "Build Lazarus" " window as well.