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

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 » Thu Apr 28, 2016 10:43 am

I was thinking about "theme module" a bit and there are some uncertainties if i would want to follow recommended/supported policy (the way i understand it) on how should 3rd Party FreeCAD module work. That is module should create and apply stylesheet on FreeCAD start and have preferences page available by default. I guess that isn't possible in straightforward fashion? Therefore i could probably explore and create a module that would work like a regular workbench and have some tools in the toolbar for now. This would still not solve the creating and applying the stylesheet step on FreeCAD start. I guess i could achieve that with workaround by manually doing that.

As for the module itself and what it should do. Blender doesn't have "toolkit stylesheet" support therefore it needs to provide this manually. But FreeCAD does have stylesheet support (Qt) and therefore text file can be created and exchanged and wide range of styling options are available. Now as for providing additional GUI options to style FreeCAD for user convenience. I feel that realistically in contrary to your attempt where you try to style every aspect of FreeCAD individually such module should only provide a group/subset of styling options. Therefore for example changing background color should apply the color to widest set of Qt elements in single step possible. One background color setting for QToolButtons (with or without menu) + QPushButtons... Therefore there would be around 10 to 20 variables and that would be it.
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 28, 2016 11:51 am

Of course I know stylesheets allow import/export/sharing on themselves but (correct me if I'm wrong) stylesheets can't handle other GUI parameters that all together define a full GUI styling. For instance, I think the following elements (with their color, width, etc parameters) should become part of an unique theme:
  • 3D view background color (plain or gradient)
  • default object shading, edges color/width... (part colors)
  • sketcher color and parameters
  • dimensions
  • grid
  • selection colors
  • Text editor colors
  • Output text colors
  • ...
If it would be possible to bundle all that on a stylesheet, xml, or similar then it would become a real import/exportable theme
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 » Thu Apr 28, 2016 5:23 pm

I was thinking about this more and i feel best to wait for Qt5 before doing any big coding related work around FreeCAD themes. But as for this:

pablogil wrote:Of course I know stylesheets allow import/export/sharing on themselves but (correct me if I'm wrong) stylesheets can't handle other GUI parameters that all together define a full GUI styling. For instance, I think the following elements (with their color, width, etc parameters) should become part of an unique theme:
  • 3D view background color (plain or gradient)
  • default object shading, edges color/width... (part colors)
  • sketcher color and parameters
  • dimensions
  • grid
  • selection colors
  • Text editor colors
  • Output text colors
  • ...
If it would be possible to bundle all that on a stylesheet, xml, or similar then it would become a real import/exportable theme


Actually we already have that in current FreeCAD. Most of what you wrote can be styled in FreeCAD preferences. Therefore if you would like to style this to suit your themes and after share it with other users look no further than your user.cfg (maybe system.cfg) file. It's a XML document and you can therefore share the changes with other users with ease. ;)
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 28, 2016 6:08 pm

triplus wrote:I was thinking about this more and i feel best to wait for Qt5 before doing any big coding related work around FreeCAD themes.

I do agree

triplus wrote:Actually we already have that in current FreeCAD. Most of what you wrote can be styled in FreeCAD preferences. Therefore if you would like to style this to suit your themes and after share it with other users look no further than your user.cfg (maybe system.cfg) file. It's a XML document and you can therefore share the changes with other users with ease. ;)


Of course, I know, but what I'm talking about is about user experience: regular users would like to have a crazy easy way to completely mimic themes from others, that is, a export/import theme button.

Well, maybe at this point I should apologize, I'm being pretty critic expressing my point of view, please, don't pay lot of attention to what I say, I know there are tons of hours of development on the background. I just want to express my ideas on how to make FreeCAD GUI flexible and attractive for normal users :)
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 » Thu Apr 28, 2016 6:53 pm

pablogil wrote:Of course, I know, but what I'm talking about is about user experience: regular users would like to have a crazy easy way to completely mimic themes from others, that is, a export/import theme button.


I understand and hopefully this will improve in the future. That is possibility to install stylesheets in user Gui folder and not only modules in Mod folder. If we talk from the perspective of what is likely to become FreeCAD "package manager" in future. As for additionally applying (selectively importing) GUI style related parameters. It is possible but i am not sure if this will happen soon. Like installing macro and automatically having button on macro toolbar after... This all are challenges remaining to be resolved.

But not all is bad as providing stylesheet + optional parameters + instruction on where to put the cfg file or on how to import the parameters manually) should work!

Well, maybe at this point I should apologize, I'm being pretty critic expressing my point of view, please, don't pay lot of attention to what I say, I know there are tons of hours of development on the background. I just want to express my ideas on how to make FreeCAD GUI flexible and attractive for normal users :)


Don't worry about it. ;)
lah
Posts: 3
Joined: Mon Nov 14, 2016 8:49 pm

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

Postby lah » Thu Nov 17, 2016 3:12 pm

Hello,

I have an issue with stylesheets.

Here is my configuration :
OS: "Manjaro Linux"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Release
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.1

When a select a stylesheet, "tree" icons are not displayed anymore (but clicking left of items opens/close tree):
bug_freecad_stylesheet.png
bug_freecad_stylesheet.png (27.65 KiB) Viewed 349 times


Any help would be appreciated!

lah
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 Nov 17, 2016 4:06 pm

lah wrote:Hello,

I have an issue with stylesheets.

Here is my configuration :
OS: "Manjaro Linux"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Release
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.1

When a select a stylesheet, "tree" icons are not displayed anymore (but clicking left of items opens/close tree):
bug_freecad_stylesheet.png

Any help would be appreciated!

lah

Are you using official v0.16 version? it should display Version: 0.16.6703 (Git)
This official version has already installed the stylesheets and the icons, which seems to be your problem (they aren't showing up on your screenshot).

Maybe, the easier way is to reinstall the official v0.16 version: https://github.com/FreeCAD/FreeCAD/releases/tag/0.16
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
lah
Posts: 3
Joined: Mon Nov 14, 2016 8:49 pm

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

Postby lah » Fri Nov 18, 2016 7:14 am

I installed this package from archlinux repo : https://www.archlinux.org/packages/comm ... 6/freecad/ . Now, I installed latest git version (0.17 - 8945) and tree icons are back.
Thanks for your help!
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 » Fri Nov 18, 2016 7:45 am

lah wrote:I installed this package from archlinux repo : https://www.archlinux.org/packages/comm ... 6/freecad/ . Now, I installed latest git version (0.17 - 8945) and tree icons are back.
Thanks for your help!

Happy to hear that ;)

Anyway, I remember you that 0.17 is not an stable version and you might experience crashes and commands not properly working. Official 0.16 version also includes the stylesheets and you would get a more stable FreeCAD
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
User avatar
Kunda1
Posts: 619
Joined: Thu Jan 05, 2017 9:03 pm

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

Postby Kunda1 » Wed Feb 15, 2017 8:14 pm

Should this thread be moved to the UI/UX Design subforum ?