Posts: 79
Joined: Fri Jun 05, 2015 4:18 am

DIY Dark Theme / Mod (sort of)

Mon Jun 22, 2020 7:31 pm

A few days back I was looking for an option to disable the blue/white gradient inside the 3d viewport.

Looks like this is not an option (yet). Looking through the forum I came across the "Dark Theme"-Thread. So I tried to figure out if at least all the bright white spaces could be toned done a bit. And yes, they can be changed. Actually it's pretty easy:

S3D is a Qt application. So it supports some ways to modify the design of an already compiled application. There's environment variables and the possibility of simple plain text style sheets. They do follow the CSS syntax, so finding documentation out there is no problem...

Setting QT_STYLE_OVERRIDE didn't really work for me, the two styles provided ("Windows" or "Fusion") were both bright and looked almost identical (actually I can't remember if anything than the buttons was looking different). So I had a go at a style sheet:


Many of Qt's components can be styled using a QSS like this. But there's two or three things I didn't find out:

1. The 3D view is obviously some custom widget/thing. No matter what I tried I couldn't affect that part of S3D in any way. Maybe it's an OpenGL viewport drawing that gradient as a camera background, who knows.

Edit: Removed pictures/description of parts missing, fixed this...

Long story short: What I initially wanted to do (remove the blue/white gradient) didn't work. But maybe some of you would like to take a look at this or just use this "mostly dark theme".

Here's the style sheet:

Simply add "-stylesheet path\and\name_of_stylesheet.qss" to your shortcut of simplify3d.exe.


I put the file right inside the S3D directory. If you're going to change/edit it, make sure your user account does have proper permissions.

Just in case you're having trouble with anything - make sure it's not caused by using the stylesheet before contacting s3d support!
I looked for obvious problems when using this theme, so far it seems to work. But I'm not using the Machine Control Panel, so there might be places where the changes don't apply or something may be hidden (like the colors in tools->options).
Oh... I'm not using Dark Mode Themes myself... I switched Windows to Dark Mode and tried to mimic that somewhat. And I didn't check if maybe the myriad of qt styles for download out there can somehow be adapted to compiled applications. Or some of them. Or if maybe using tools like Ressource Hacker might give access to the viewports background (if it's a bitmap).

By the way, this is a pretty easy method to seperate multiple instances of S3D running...

Edit: Depending on the angles you're usually looking at things on the print bed you can use the printer model feature (Tools -> Options -> Machine) to darken the viewport somewhat using two planes/thin boxes forming an "L":


And another Edit:
Fixed the style sheet regarding color visibility in "tools -> options -> visualization" and grey areas left. Temperature plot still looks somewhat bright but that may be a custom thing like the 3d viewport...

Have fun,

Posts: 79
Joined: Fri Jun 05, 2015 4:18 am

Re: DIY Dark Theme / Mod (sort of)

Wed Jun 24, 2020 3:35 pm

The white checkboxes/radiobuttons can also be changed. But this requires a few image files,
QSS doesn't support putting base64 encoded images right in, sadly.


Everything from the first post is left untouched. But if you want to, you can use the version attached
to this post. It includes 4 png images and the stylesheet. Move these files into your s3d folder and
add "-stylesheet S3D_Dark.qss" to its shortcut.

Of course you can put the images somewhere else, but that'd mean you have to change the stylesheet
accordingly. By default the application will look for images relative to its current working directory.

Edit: I was so looking for any boxes/buttons left inside dialogs I completely missed the ones inside the models list. Fixed. :D
(4.66 KiB) Downloaded 12 times

Return to “General Discussion and Tips”