dark mode, macos
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
dark mode, macos
Solution:
The only thing needed to enable macos native dark mode with freecad 0.19.1 is to run this in Terminal.app:
defaults write freecad NSRequiresAquaSystemAppearance -bool FALSE
(So, no need to edit the Info-plist file to set your own bundle identifier or any other hocus-pocus.)
---------------------------
Original post:
FreeCAD 0.18 and 0.19 doesn't seem to adopt to macos dark mode (it leaves the application frame and sometimes menus light).
I learned that it is possible to force apps to run in macos dark mode by executing the following line in Terminal.app (this example uses the "bundle identifier" of the FOSS app Audacity):
defaults write org.audacityteam.audacity NSRequiresAquaSystemAppearance -bool FALSE
(To reset to light mode, change FALSE to TRUE...)
But this doesn't work for FreeCAD - probably because FreeCAD lacks a bundle identifier.
I made a thread about the missing bundle identifier here: https://forum.freecadweb.org/viewtopic. ... e08906e9bb
Anyway, my eyes are bleeding... And I don't know if it has to to with the identifier... Anyone knows a workaround/fix? Please help!
(Running macos Mojave)
The only thing needed to enable macos native dark mode with freecad 0.19.1 is to run this in Terminal.app:
defaults write freecad NSRequiresAquaSystemAppearance -bool FALSE
(So, no need to edit the Info-plist file to set your own bundle identifier or any other hocus-pocus.)
---------------------------
Original post:
FreeCAD 0.18 and 0.19 doesn't seem to adopt to macos dark mode (it leaves the application frame and sometimes menus light).
I learned that it is possible to force apps to run in macos dark mode by executing the following line in Terminal.app (this example uses the "bundle identifier" of the FOSS app Audacity):
defaults write org.audacityteam.audacity NSRequiresAquaSystemAppearance -bool FALSE
(To reset to light mode, change FALSE to TRUE...)
But this doesn't work for FreeCAD - probably because FreeCAD lacks a bundle identifier.
I made a thread about the missing bundle identifier here: https://forum.freecadweb.org/viewtopic. ... e08906e9bb
Anyway, my eyes are bleeding... And I don't know if it has to to with the identifier... Anyone knows a workaround/fix? Please help!
(Running macos Mojave)
Last edited by drucken on Mon Mar 29, 2021 6:54 am, edited 2 times in total.
Re: dark mode, macos
I looked around some more and discovered that it's possible to add the following lines manually to the FreeCAD Info.plist file (/Applications/FreeCAD/Contents/), without the need for a bundle identifier:
<key>NSRequiresAquaSystemAppearance</key>
<string>False</string>
Even if this fixes the dark mode problem for many other apps, unfortunately this doesn't seem to be the case with FreeCAD
<key>NSRequiresAquaSystemAppearance</key>
<string>False</string>
Even if this fixes the dark mode problem for many other apps, unfortunately this doesn't seem to be the case with FreeCAD
Re: dark mode, macos
Another Terminal based workaround that doesn't work with FreeCAD
/Applications/FreeCAD.app/Contents/MacOS/FreeCAD -NSRequiresAquaSystemAppearance NO
https://forums.macrumors.com/threads/fo ... t-26400798
/Applications/FreeCAD.app/Contents/MacOS/FreeCAD -NSRequiresAquaSystemAppearance NO
https://forums.macrumors.com/threads/fo ... t-26400798
Re: dark mode, macos
Audacity seems to use wxWidgets to draw its GUI, FreeCAD uses Qt. So this could explain why what works for audacity doesn't work for freecad. If you want do dig deeper, I suggest to look explicitly for solutions for Qt-based applications.
A quick search shows me more issues than solutions, though.
A quick search shows me more issues than solutions, though.
Re: dark mode, macos
jonasb, thanks for your input!
Do you think that the possibility me to fix dark mode locally is limited cause of the Qt base of FreeCAD, or the possibility for the FreeCAD developers to fix it?
In a list of Qt-based applications I found at least some that works with mojave dark mode, for example VLC and Transmission - so it must be possible at least for the devs right?
Not sure if this is of any relevance: https://www.learnpyqt.com/blog/macos-mo ... -pyqt5122/
Should i report a bug somewhere somehow? I'm new here so please point me in the right direction...
Do you think that the possibility me to fix dark mode locally is limited cause of the Qt base of FreeCAD, or the possibility for the FreeCAD developers to fix it?
In a list of Qt-based applications I found at least some that works with mojave dark mode, for example VLC and Transmission - so it must be possible at least for the devs right?
Not sure if this is of any relevance: https://www.learnpyqt.com/blog/macos-mo ... -pyqt5122/
Should i report a bug somewhere somehow? I'm new here so please point me in the right direction...
Re: dark mode, macos
Wow, something strange just happened.
When I started FreeCAD for the first time since yesterdays failed(?) trial and error session (see post 1, 2 and 3 above) it is in dark mode!
Not sure what made it work, I think the only thing that I changed in the end was to fill in a bundle identifier in the Info.plist file (see whole file below) and then run the following command in Terminal.app:
defaults write org.freecad.freecad019 NSRequiresAquaSystemAppearance -bool FALSE
Info.plist content:
Also, I am using the ProDark stylesheet (and SelectorToolbar addon)
Let's see if it stays like this, and if it's buggy or not.
When I started FreeCAD for the first time since yesterdays failed(?) trial and error session (see post 1, 2 and 3 above) it is in dark mode!
Not sure what made it work, I think the only thing that I changed in the end was to fill in a bundle identifier in the Info.plist file (see whole file below) and then run the following command in Terminal.app:
defaults write org.freecad.freecad019 NSRequiresAquaSystemAppearance -bool FALSE
Info.plist content:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>FreeCAD</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>freecad.icns</string>
<key>CFBundleIdentifier</key>
<string>org.freecad.freecad019</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>Version 0.19-24276</string>
<key>CFBundleName</key>
<string>FreeCAD-0.19-24276</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.19-24276</string>
<key>CFBundleSignature</key>
<string></string>
<key>CFBundleVersion</key>
<string>0.19-24276</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>FCStd</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>freecad-doc.icns</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
</array>
</dict>
</plist>
Also, I am using the ProDark stylesheet (and SelectorToolbar addon)
Let's see if it stays like this, and if it's buggy or not.
Last edited by drucken on Thu Mar 25, 2021 10:09 am, edited 1 time in total.
Re: dark mode, macos
Re: dark mode, macos
Update:
FreeCAD 0.19.1 with native macos dark mode enabled seems to be just as stable as before, so that's great!
But, when I try to do enable dark mode on another system (also macos mojave)... I can't...
FreeCAD 0.19.1 with native macos dark mode enabled seems to be just as stable as before, so that's great!
But, when I try to do enable dark mode on another system (also macos mojave)... I can't...