Netherlands
Joined: Apr 8, 2022
Post Count: 1010
Status:
Offline
Dark Mode
In the blog for 6.6 (27 July 2021) future support of a dark mode is mentioned. Is there any progress in that direction?
Switching between Sweet Home 3D and Blender painfully shows how much better a dark mode is for your eyes, especially with the current early dark evenings . The interface and 2Dview have a lot of glaring white screen space which would be a lot less straining on the eyes with a dark mode.
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects
Netherlands
Joined: Apr 8, 2022
Post Count: 1010
Status:
Offline
Re: Dark Mode
In the preferences you can set a default font. There are fonts that are larger by default so setting such a font should give you a larger font in the userinterface.
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects
Joined: Jan 8, 2017
Post Count: 18
Status:
Offline
Re: Dark Mode
Per further research per Emmanuel:
> If you're able to run Sweet Home 3D from code source, simply change implementation of getBackgroundColor and getForegroundColor in PlanComponent class. Otherwise, this might be difficult.
Netherlands
Joined: Apr 8, 2022
Post Count: 1010
Status:
Offline
Re: Dark Mode
If you're able to run Sweet Home 3D from code source, simply change implementation of getBackgroundColor and getForegroundColor in PlanComponent class. Otherwise, this might be difficult.
That's not even close to a Dark Mode. Implementing a Dark Mode is basically implementing a theme system and that's not an easy or quick job. I haven't seen a response to my initial information request but I suspect that the first step needed is switching from ancient Swing to JavaFX. I have no idea how easy or difficult this is, the sources I found online differ very much in their options. Looking at the future, switching to JavaFX might not be a step that can be ignored.
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects
Italy
Joined: Nov 17, 2021
Post Count: 431
Status:
Offline
Re: Dark Mode
Theming is extremely easy to implement in java swing applications, it just requires adding the theme jar to the library path and a parameter to the command line to tell which theme it should use.
It seems that this method doesn't work with the exe launcher (the program freezes), but works fine if SH3D is started through the jar file.
A nice dark theme library can be found in flatlaf. Once you add the jar to the install_dir/lib folder, you can start SH3D from the jar file adding the following option to the command line:
Netherlands
Joined: Apr 8, 2022
Post Count: 1010
Status:
Offline
Re: Dark Mode
I should have known somebody already did the hard work, in this case FlatLaf I read about that project when researching about dark mode but didn't realize it was so easy to use it with Swing.
---------------------------------------- Dodecagon.nl 700+ 3D models, manuals, and projects
United States
Joined: Jun 5, 2024
Post Count: 3
Status:
Offline
Re: Dark Mode
Hi,
I've tried using the FlatDarkLaf but am not having any success. I've never ran any java swing program like this before, so I might be missing something simple.
I added flatlaf-3.4.1.jar into the sweethome3d\lib folder. I ran "java -jar SweetHome3D-7.4 jar -Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf. From cmd it starts to run sweethome but hangs after the logo displays. From powershell it runs, pauses, then launches the program but without applying flatdarklaf.