Dark and Light FreeCAD stylesheets (v1.8a)

Info about new implemented features, classes, modules or APIs. Might get technical!
User avatar
easyw-fc
Posts: 647
Joined: Thu Jul 09, 2015 9:34 am

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby easyw-fc » Fri Sep 23, 2016 11:06 am

pablogil wrote:I don't know, I just know how to style QT, I'm not C++ or Python coder... :(

Hi, I found a way to get if a StykeSheet is applied and in case list all the attributes

Code: Select all

print QtGui.QApplication.style().metaObject().className()    #
print QtGui.QApplication.instance().styleSheet()    # list all applied styles   

Then I can manage the button styles :)

Thank you for your nice stylesheets :D
Maurice
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby pablogil » Fri Sep 23, 2016 11:08 am

easyw-fc wrote:
pablogil wrote:I don't know, I just know how to style QT, I'm not C++ or Python coder... :(

Hi, I found a way to get if a StykeSheet is applied and in case list all the attributes

Code: Select all

print QtGui.QApplication.style().metaObject().className()    #
print QtGui.QApplication.instance().styleSheet()    # list all applied styles   

Then I can manage the button styles :)

Thank you for your nice stylesheets :D
Maurice

Cool!
I'm happy to found the way :D
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
bill
Posts: 163
Joined: Fri Jan 09, 2015 9:25 pm

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby bill » Mon Mar 13, 2017 4:34 pm

Is this a problem with Stylesheets or the Widget itself?
touchpadcrop.png
touchpadcrop.png (5.15 KiB) Viewed 316 times
User avatar
yorik
Site Admin
Posts: 8647
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby yorik » Mon Mar 13, 2017 11:08 pm

It looks like french :D "touche pas!"
triplus
Posts: 4988
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby triplus » Tue Mar 14, 2017 12:54 am

bill wrote:Is this a problem with Stylesheets or the Widget itself?
touchpadcrop.png


Hi @bill.

I would say it goes more in the direction of feature request. That is UX element like navigation indicator was never done before yet in FreeCAD and therefore Dark and Light stylesheets don't yet have optimal support for styling it.

P.S. I likely won't be able to have a look before weekend.
pablogil
Posts: 517
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby pablogil » Tue Mar 14, 2017 10:03 am

Hi,

Yes, that feature has been introduced after the last stylesheet update so it needs a little tweaking... @triplus, could you add an ID to the QPushButton so that I can theme it without interfering the rest of elements? I know where is the problem and it has a difficult solutionif not introducing this new ID...

thanks
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
triplus
Posts: 4988
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby triplus » Tue Mar 14, 2017 10:47 am

pablogil wrote:@triplus, could you add an ID to the QPushButton so that I can theme it without interfering the rest of elements?


Hi Pablo. Try using:

Code: Select all

NavigationIndicator
triplus
Posts: 4988
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dark and Light FreeCAD stylesheets (v1.8a)

Postby triplus » Mon Apr 03, 2017 11:50 pm

Light.png
Light.png (9.23 KiB) Viewed 130 times


Dark.png
Dark.png (8.62 KiB) Viewed 130 times


https://github.com/FreeCAD/FreeCAD/pull/672
https://github.com/pgilfernandez/FreeCA ... ets/pull/4