FreeCAD looks for a new default background color

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
chennes
Veteran
Posts: 3910
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FreeCAD looks for a new default background color

Post by chennes »

adrianinsaval wrote: Sat Nov 05, 2022 3:50 pm maybe we can detect if the system is using a dark or light theme and adapt to that.
The Addon Manager detects dark-vs-light using the following heuristic:

Code: Select all

pl = FreeCADGui.getMainWindow().palette()
return pl.color(pl.Background).lightness() < 128
I do this to adapt the shades of red, yellow, and green used in messages to the user. You can try those functions yourself by importing addonmanager_utilities.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD looks for a new default background color

Post by adrianinsaval »

But that is based on the qpalette, I was thinking more along the lines of checking if the OS is in dark mode and adopt both, a dark stylesheet and background colour.
Hologram
Posts: 203
Joined: Thu Nov 03, 2022 3:05 pm

Re: FreeCAD looks for a new default background color

Post by Hologram »

Kunda1 wrote: Fri Nov 04, 2022 11:57 am @Hologram did you modify a pre-existing stylesheet? There is Blender stylesheet https://github.com/pgilfernandez/FreeCA ... stylesheet perhaps you'd be open to maintaining it ?
Honestly, I haven't downloaded FreeCAD yet, but I'll give it a thorough test for V1.0. Sorry, I'm not into coding. I may be able to share my UI when I get around to testing 1.0
Last edited by Hologram on Tue Jan 24, 2023 2:12 pm, edited 1 time in total.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: FreeCAD looks for a new default background color

Post by Zolko »

MisterMaker wrote: Sat Oct 22, 2022 12:53 pm 2.Image
...
Personally I like nr 2 but I might be biased since that one is also used in another CAD program but other colors.
me too, and the radial gradient, from center to periphery, is really nice, it gives a sort-of holy effect. What colors do you use here ?
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
MisterMaker
Posts: 744
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: FreeCAD looks for a new default background color

Post by MisterMaker »

@Zolko I'm planning to implement/test the extended background options. Just need to learn Qt first :lol:
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: FreeCAD looks for a new default background color

Post by adrianinsaval »

MisterMaker wrote: Sun Nov 13, 2022 5:58 pm @Zolko I'm planning to implement/test the extended background options. Just need to learn Qt first :lol:
The background I think is Coin3D stuff rather than Qt, but I guess you also need to know some Qt to make the preference page for this, but probably very little, you may be able to just copy/paste from other preferences.
User avatar
MisterMaker
Posts: 744
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: FreeCAD looks for a new default background color

Post by MisterMaker »

adrianinsaval wrote: Sun Nov 13, 2022 8:46 pm
MisterMaker wrote: Sun Nov 13, 2022 5:58 pm @Zolko I'm planning to implement/test the extended background options. Just need to learn Qt first :lol:
The background I think is Coin3D stuff rather than Qt, but I guess you also need to know some Qt to make the preference page for this, but probably very little, you may be able to just copy/paste from other preferences.
I need Qt for the wizard too also like to cleanup the settings menu.
Although I'd like too experiment with the background myself, I do think it's a very interesting addition too @realthunder branch.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: FreeCAD looks for a new default background color

Post by Kunda1 »

@chennes have any Qt tips here? ^^
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
chennes
Veteran
Posts: 3910
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: FreeCAD looks for a new default background color

Post by chennes »

Not really, but if you get stuck on something feel free to ping me here or on Discord.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
MisterMaker
Posts: 744
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: FreeCAD looks for a new default background color

Post by MisterMaker »

chennes wrote: Tue Nov 15, 2022 12:59 am Not really, but if you get stuck on something feel free to ping me here or on Discord.
Quick question then..
Do you only need a header.h and a main.cpp when you develop a new program?
Post Reply