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

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 » Wed Apr 27, 2016 7:56 am

I could try when I had enough time but I don't know how flexible will be FreeCAD to style button sets independently...

What I really would like to see on FreeCAD and it's the best and most flexible approach I have seen on a software about theming and GUI is what Blender does:
  • total freedom to place views and sizes
  • colors, transparency and some line widths controlled from Preferences: full GUI is themable and it's done in real time, no need to "accept changes", you have a preview just when you change parameter
  • save/import/export theme
  • and more...
IMHO is the way to follow ;)

Some examples:
theme1.png
theme1.png (236.28 KiB) Viewed 334 times

theme2.png
theme2.png (305.26 KiB) Viewed 334 times

theme3.png
theme3.png (271.73 KiB) Viewed 334 times
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 » Wed Apr 27, 2016 12:07 pm

pablogil wrote:What I really would like to see on FreeCAD and it's the best and most flexible approach I have seen on a software about theming and GUI is what Blender does...


Maybe some day but for now realistically i feel using stylesheets is the way to go. ;) And you get the same level of control there just isn't any GUI available.

P.S. As for the future i guess anything is possible.
User avatar
yorik
Site Admin
Posts: 8549
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

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

Postby yorik » Wed Apr 27, 2016 12:38 pm

These are all things that depend on QT. In Blender, they 100% coded their own GUI, so of course they have more control over it. But there are nevertheless things that we could do with QT too, for example give specific classes to certain categories of buttons, so they could be themed separately, etc... Transparent widgets would be possible too since the switch to quarter. Moving the windows all over the place would be hard to obtain I think because QT has this strict "structure" (MDI views + dock widgets).
ickby
Posts: 2417
Joined: Wed Oct 05, 2011 7:36 am

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

Postby ickby » Wed Apr 27, 2016 12:47 pm

yorik wrote:Transparent widgets would be possible too since the switch to quarter. Moving the windows all over the place would be hard to obtain I think because QT has this strict "structure" (MDI views + dock widgets).

actually I started on a GUI update with this functionality using QML once but found that QT4 is lacking too much in functionality in their QML and QtQuick implementation. this only makes sense to further proceed with this in Qt5. It is quite some work but one can chieve awesome things :)
https://www.youtube.com/watch?v=wrOP7sLqwiM
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 » Wed Apr 27, 2016 1:36 pm

ickby wrote:
yorik wrote:Transparent widgets would be possible too since the switch to quarter. Moving the windows all over the place would be hard to obtain I think because QT has this strict "structure" (MDI views + dock widgets).

actually I started on a GUI update with this functionality using QML once but found that QT4 is lacking too much in functionality in their QML and QtQuick implementation. this only makes sense to further proceed with this in Qt5. It is quite some work but one can chieve awesome things :)
https://www.youtube.com/watch?v=wrOP7sLqwiM


Yes i personally do like to have bigger 3D View area available and am looking forward to have "Qt 5 interface" available. For now i use more basic approach:

Example.png
Example.png (3.58 KiB) Viewed 307 times
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 » Wed Apr 27, 2016 3:12 pm

As for the GUI theme styling support i guess the same approach could be used i (will) use in TabBar.

  • Module responsible for styling the GUI would apply the stylesheet at FreeCAD start.
  • Supported stylesheet values would be read from saved parameters.
  • GUI would be provided to change the parameters.
  • When user changes the value stylesheet is applied again.

But i guess something like this has less chance to be merged in master. Therefore i guess something that can be explored and made as potential 3rd Party FreeCAD module in the future.
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 » Wed Apr 27, 2016 5:36 pm

ickby wrote:
yorik wrote:Transparent widgets would be possible too since the switch to quarter. Moving the windows all over the place would be hard to obtain I think because QT has this strict "structure" (MDI views + dock widgets).

actually I started on a GUI update with this functionality using QML once but found that QT4 is lacking too much in functionality in their QML and QtQuick implementation. this only makes sense to further proceed with this in Qt5. It is quite some work but one can chieve awesome things :)
https://www.youtube.com/watch?v=wrOP7sLqwiM

Cool stuff, I like it!

triplus wrote:As for the GUI theme styling support i guess the same approach could be used i (will) use in TabBar.

  • Module responsible for styling the GUI would apply the stylesheet at FreeCAD start.
  • Supported stylesheet values would be read from saved parameters.
  • GUI would be provided to change the parameters.
  • When user changes the value stylesheet is applied again.

But i guess something like this has less chance to be merged in master. Therefore i guess something that can be explored and made as potential 3rd Party FreeCAD module in the future.


This is not crazy, even more, my stylesheets are designed on a way on mind (reusing colors and code) so if it's possible to have something like what you described it would be fairly enough as a first approach.
A second step would be to place all "color parameters" into a same Preference tab, probably merging it with some of the UI properties already available into FreeCAD.
A third step would be to develop a way to import/export the color/UI setting so that people can share and easily switch between themes (similar as Blender does)

@triplus, do you think It's still too soon to dream about it?
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 » Wed Apr 27, 2016 7:33 pm

pablogil wrote:@triplus, do you think It's still too soon to dream about it?


Well i guess it is never too early or too late to dream. ;)

P.S. What i can try is first to finish the Style Tab in TabBar and after i will try to think of a way to produce a "theme module" you can use and build upon if you want. I am not yet sure if i will be able to do it and how exactly it will work but i guess if installed it should do what you are after.
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 » Wed Apr 27, 2016 8:59 pm

triplus wrote:
pablogil wrote:@triplus, do you think It's still too soon to dream about it?


Well i guess it is never too early or too late to dream. ;)

P.S. What i can try is first to finish the Style Tab in TabBar and after i will try to think of a way to produce a "theme module" you can use and build upon if you want. I am not yet sure if i will be able to do it and how exactly it will work but i guess if installed it should do what you are after.


It has sense to go that way, if you need help on TabBar styles let me know, I have gain some experience with QT styling and additionally I have an overall idea on how to setup the styles in order to get a "parametric style" :)
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 » Wed Apr 27, 2016 10:27 pm

ickby wrote:
yorik wrote:Transparent widgets would be possible too since the switch to quarter. Moving the windows all over the place would be hard to obtain I think because QT has this strict "structure" (MDI views + dock widgets).

actually I started on a GUI update with this functionality using QML once but found that QT4 is lacking too much in functionality in their QML and QtQuick implementation. this only makes sense to further proceed with this in Qt5. It is quite some work but one can chieve awesome things :)
https://www.youtube.com/watch?v=wrOP7sLqwiM


I had enough time to watch the full video and should say that this UI needs to be on master as son as possible, it's awesome and makes FreeCAD interface to look pretty modern and fancy. I would only add the option to save view layouts and restore them when you need them (useful when you need to work with different views such as spreadsheets, pages or combined as tiled views).
I hope QT5 goes soon to master so that you have the option to seriously think about finish this new UI...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here