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

A subforum for research and development of the user interface of FreeCAD

Moderator: agryson

User avatar
sgrogan
Posts: 2978
Joined: Wed Oct 22, 2014 5:02 pm

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

Postby sgrogan » Tue Apr 19, 2016 1:39 pm

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/master/src/Gui/Stylesheets/CMakeLists.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.
pablogil
Posts: 502
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

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

Postby pablogil » Tue Apr 19, 2016 3:48 pm

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/master/src/Gui/Stylesheets/CMakeLists.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
pablogil
Posts: 502
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

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

Postby pablogil » Tue Apr 19, 2016 3:55 pm

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
Site Admin
Posts: 11222
Joined: Thu Feb 19, 2009 10:32 am

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

Postby wmayer » Thu Apr 21, 2016 12:28 pm

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
pablogil
Posts: 502
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

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

Postby pablogil » Thu Apr 21, 2016 12:49 pm

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 375 times


Any other idea?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
wmayer
Site Admin
Posts: 11222
Joined: Thu Feb 19, 2009 10:32 am

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

Postby wmayer » Thu Apr 21, 2016 12:53 pm

It doesn't work:

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

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

Postby pablogil » Thu Apr 21, 2016 1:21 pm

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
Site Admin
Posts: 11222
Joined: Thu Feb 19, 2009 10:32 am

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

Postby wmayer » Thu Apr 21, 2016 1:46 pm

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

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

Postby pablogil » Thu Apr 21, 2016 2:39 pm

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
Posts: 4836
Joined: Mon Dec 12, 2011 4:45 pm

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

Postby triplus » Tue Apr 26, 2016 8:27 pm

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.