Dark Mode
This topic has been viewed 46920 times and has 34 replies
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.
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
1300+ 3D models, manuals, and projects
1300+ 3D models, manuals, and projects
Re: Dark Mode
Indeed! I was wondering about this as well.
-
MantisNebula
- Posts: 1
- Joined: Mon Feb 05, 2024 6:54 am
Re: Dark Mode
I agree. Using this on a 60" TV is rough on my photosensitive eyes.
Also it would be helpful to have a simple way to adjust the font size.
Also it would be helpful to have a simple way to adjust the font size.
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
1300+ 3D models, manuals, and projects
1300+ 3D models, manuals, and projects
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.
ref: https://www.sweethome3d.com/support/for ... 4173AC2B00
Relevant ticket:
https://sourceforge.net/p/sweethome3d/f ... uests/824/
> 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.
ref: https://www.sweethome3d.com/support/for ... 4173AC2B00
Relevant ticket:
https://sourceforge.net/p/sweethome3d/f ... uests/824/
Re: Dark Mode
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.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.
Dodecagon.nl
1300+ 3D models, manuals, and projects
1300+ 3D models, manuals, and projects
- Daniels118
- Posts: 503
- Joined: Wed Nov 17, 2021 9:04 pm
- Country: Italy
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:
Result:

Here you can find the available themes in flatlaf:
https://www.formdev.com/flatlaf/themes/
On the same website you can download a nice theme editor to create your own theme (with real time preview).
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:
Code: Select all
-Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf
Here you can find the available themes in flatlaf:
https://www.formdev.com/flatlaf/themes/
On the same website you can download a nice theme editor to create your own theme (with real time preview).
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.
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
1300+ 3D models, manuals, and projects
1300+ 3D models, manuals, and projects
-
shadowcaster
- Posts: 3
- Joined: Wed Jun 05, 2024 7:13 am
- Country: United States
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.
Any suggestions?
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.
Any suggestions?
- Daniels118
- Posts: 503
- Joined: Wed Nov 17, 2021 9:04 pm
- Country: Italy
Re: Dark Mode
Use the following commands:
Code: Select all
set SH3DINST=C:\Program Files\Sweet Home 3D
"%SH3DINST%\runtime\bin\javaw.exe" -Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf "-Djava.library.path=%SH3DINST%\lib\java3d-1.6\;%SH3DINST%\lib\yafaray;%SH3DINST%\lib\yafaray\yafaray-plugins" -classpath "%SH3DINST%\lib\java3d-1.6\*;%SH3DINST%\lib\*" com.eteks.sweethome3d.SweetHome3DWho is online
Users browsing this forum: No registered users and 1 guest