Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by sgrogan »

pablogil wrote: I have just checked that Windows x64 installer puts all stylesheet images inside /Stylesheets/ folder instead of /Stylesheets/images/ which make the style not to show the images...
This time it appears to be in the FreeCAD source Code
https://github.com/FreeCAD/FreeCAD/blob ... ts.txt#L23
I think it should be the same on all installed versions except the Win x86 installer (I packaged this from the build directory, not the install target). Can someone using the Ubuntu PPA (stable or daily) verify.
I'm not sure if the OS X release is packaged from the build directory or the Install Target, so the problem may exist there as well.
If verified I can submit a patch this evening.
"fight the good fight"
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by pablogil »

sgrogan wrote:
pablogil wrote: I have just checked that Windows x64 installer puts all stylesheet images inside /Stylesheets/ folder instead of /Stylesheets/images/ which make the style not to show the images...
This time it appears to be in the FreeCAD source Code
https://github.com/FreeCAD/FreeCAD/blob ... ts.txt#L23
I think it should be the same on all installed versions except the Win x86 installer (I packaged this from the build directory, not the install target). Can someone using the Ubuntu PPA (stable or daily) verify.
I'm not sure if the OS X release is packaged from the build directory or the Install Target, so the problem may exist there as well.
If verified I can submit a patch this evening.
Oh, you are right... then it was a luck to find it because my computer is full of development /images/ folders, and any FreeCAD could read the files from there... it's curious that only x64 version don't...

Later I can check it out on my computer (windows, Mac and Ubuntu), I'll let you know
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by pablogil »

derei wrote:Thank you for the clear instructions. I will apply them in my template.

There is no glitch, is just the top menu bar that has the same color like the background. I like it this way, is more uniform.
My system is Win7x64 and I use FreeCAD 0.16 rev.6698
Full screenshot attached - you can see the top menu bar goint all the way
2016-04-10_131932.jpg
It seems to be something inside the FreeCAD code, I can't figure out which element it is with a stylesheet... could anyone experienced on FreeCAD code have a look at it? I guess it is hard coded...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by wmayer »

What about this tiny white line?
It's a QLabel that has been added to the status bar. https://github.com/FreeCAD/FreeCAD/blob ... w.cpp#L282
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by pablogil »

wmayer wrote:
What about this tiny white line?
It's a QLabel that has been added to the status bar. https://github.com/FreeCAD/FreeCAD/blob ... w.cpp#L282
If I add the following code to the stylesheet:

Code: Select all

QLabel {
	background-color: red;
	border: 1px solid yellow;
}
It doesn't work:
not_qlabel.png
not_qlabel.png (6.18 KiB) Viewed 1998 times
Any other idea?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by wmayer »

It doesn't work:
What doesn't work?
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by pablogil »

wmayer wrote:
It doesn't work:
What doesn't work?
Trying to style this "white line" with the following code doesn't work:

Code: Select all

QLabel {
   background-color: red;
   border: 1px solid yellow;
}
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by wmayer »

The line must be something that adds the QStatusBar class. But it's not a widget.
User avatar
pablogil
Posts: 882
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by pablogil »

wmayer wrote:The line must be something that adds the QStatusBar class. But it's not a widget.
... so it's not stylable, doesn't it?

Could it be changed or removed to "fix" this "styling incoherence"?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dark and Light FreeCAD stylesheets (2.x, 3.x,...) and beyond

Post by triplus »

One idea i had for a while. What you could try out is to take dark/light stylesheet as a base and add small amount of FreeCAD branding colors to it:

http://www.freecadweb.org/wiki/index.ph ... olor_chart

I am not sure how it would turn out. But as you did Blender one maybe you will be interested in trying this out in the future.
Post Reply