United States
Joined: Jun 5, 2024
Post Count: 3
Status:
Offline
Re: Dark Mode
Hello Daniels,
Thanks for replying. I tried running those commands, but the result is still the same.
This was the initial result:
PS C:\Program Files\Sweet Home 3D\lib> set SH3DINST="C:\Program Files\Sweet Home 3D" PS C:\Program Files\Sweet Home 3D\lib> "%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.SweetHome3D At line:1 char:36 + "%SH3DINST%\runtime\bin\javaw.exe" -Dswing.defaultlaf=com.formdev.fla ... + ~~~~~~~ Unexpected token '-Dswing' in expression or statement. At line:1 char:43 + ... javaw.exe" -Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf "-Djava ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unexpected token '.defaultlaf=com.formdev.flatlaf.FlatDarkLaf' in expression or statement. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken
However, with some chatgpt help I ended up with:
PS C:\Program Files\Sweet Home 3D\lib> $env:SH3DINST="C:\Program Files\Sweet Home 3D" PS C:\Program Files\Sweet Home 3D\lib> & "$env:SH3DINST\runtime\bin\javaw.exe" -Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf "-Djava.library.path=$env:SH3DINST\lib\java3d-1.6;$env:SH3DINST\lib\yafaray;$env:SH3DINST\lib\yafaray\yafaray-plugins" -classpath "$env:SH3DINST\lib\java3d-1.6\*;$env:SH3DINST\lib\*" com.eteks.sweethome3d.SweetHome3D PS C:\Program Files\Sweet Home 3D\lib>
I tried running this from both inside the sweet home 3d\lib folder and just from C:\. Either way, the end result was running the java -jar command with -dswing again but still not seeing any changes.
I did come across another post regarding changing resolution that stated to add an ini file with:
and this did work to change the LAF. However, I couldn't figure out how to make flatlaf work in this same way. Note that I did test the above code without this ini file in the sweet home folder to ensure there wasn't a conflict.
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Dark Mode
Maybe you should use quotes also around "-Dswing.defaultlaf=com.formdev.flatlaf.FlatDarkLaf"
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
United States
Joined: Jun 5, 2024
Post Count: 3
Status:
Offline
Re: Dark Mode
Thank you Daniels! I had tried cmd yesterday but got an error. I see now it was because I added quotes around the file path in the set command thinking it wouldn't properly read the spaces.
Thanks so much for the help! My eyes will be forever grateful :)
GERMANY | POLAND
Joined: Jun 8, 2024
Post Count: 25
Status:
Offline
Re: Dark Mode
Thank you for the information about the flatlaf. I have now implemented it and adapted many things. It looks like KDE. Really great! But dark-mode is not all you need. You still need icons for the dark interface, otherwise you won't see ANYTHING if the icons are dark. And this is often the case. This is exactly how you need to prepare the icons for plugins. I have done all this and it really looks "round". However, I still have a problem: The icons from the plugins are ALWAYS scaled with 16 pixels in the menus, although I have generated them from vector graphics with 32 pixels. In dialogs of plugins, other icons are displayed correctly and in a large size. Does anyone have any idea what it could be? If someone wants, I can send the icons and flatlaf properties.
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Dark Mode
Very nice work byDMA! And you even prepared a new icon set! The existing ones in reverse video didn't please you? Anyway, I hope at least that the SVG existing ones helped you to prepare the new set faster. It could be possible that 32x32 icons in plug-ins are ignored because they are accessed from plug-in class loader, and FlatLaf needs more information to find it (this would probably require some modifications in Sweet Home 3D or FlatLaf source code).
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
GERMANY | POLAND
Joined: Jun 8, 2024
Post Count: 25
Status:
Offline
Re: Dark Mode
Hi Emmanuel, thanks for the quick response and for the praise.
The existing ones in reverse video didn't please you?
Which video do you mean?
I've done some more tests and found out the following: -This has nothing to do with Flatlaf, this is also the case in the old Steel design - It ONLY works if scaling factor is 2, between 1 and 2 this does not change - Scaling is really a bad idea at Latlaf, everything is going to be huge
Latlaf (out-the-box) is actually an ideal interface for SH3D, everything is scaled and designed correctly - except for the icons from the plugins :-)
I suspect this is the JFrame in the menu(s) for the plugins in SH3D. It frames the icons up to the scaling factor 2. Only then it gets bigger and the icons are enlarged.
Could you check it out? This should not be a big problem. Then the design would be perfect.
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Dark Mode
By "reverse video", I meant "opposite colors" : white becomes black and black becomes white. The icons proposed in version 6.6 were designed for this purpose.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
"De gustibus non est disputandum" :-) Its GTK 20 years ago, but seriously, the users are coming from mac, windows AND linux, and it should be customizable.