Feedback/ideas needed: "Themes" (now "Preference Packs") User Interface

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Feedback/ideas needed: "Themes" (now "Preference Packs") User Interface

Post by chennes »

For the last couple of weeks I've been working on a new feature tentatively called "Themes" (see https://forum.freecadweb.org/viewtopic.php?f=34&t=57301). The original idea was to allow UI designers to encapsulate entire sets of colors along with the Qt Stylesheet. For example, setting the background color of the main window and Start, change the colors used by Sketcher, etc.

The actual implementation is a bit more general than that: technically, a theme is just a set of preferences. Anything stored as a user preference in user.cfg can potentially be in a theme. Applying a theme works exactly as though the user had manually used the preferences window to go through the items one by one and set them: applying a theme is a one-shot update to your preferences, which you can then customize as much as you like, and potentially save as a new theme.

Right now, the user interface looks like this:
Screenshot 2021-04-28 135455.png
Screenshot 2021-04-28 135455.png (110.36 KiB) Viewed 3899 times
So, the "Theme" is set on the first page of the Preferences dialog. But, since it's not really just a single preference, but an entire package of them, it has its own apply button. Once you hit "Apply" on a theme, that button changes to say "Reapply" -- it does the same thing, I'm just trying to suggest the idea that applying a theme is a sort of one-time action.

This design is a bit problematic because themes are not like the other preferences in this dialog. This still feels to me like the most natural place to put them, but the UI is a little sketchy. Hence this post: I'm looking for feedback and/or ideas for how to improve it before I submit the PR. Of course, it may be that people need to use it for a while before we really know how to make it better, but I'd like the first version of it to at least be usable!
Last edited by chennes on Wed May 12, 2021 6:32 pm, edited 1 time in total.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: Feedback/ideas needed: "Themes" User Interface

Post by adrianinsaval »

ChrisWesley wrote:
maybe you're interested in helping with the UI here?
User avatar
Meetlat
Posts: 72
Joined: Tue Oct 13, 2020 7:00 am

Re: Feedback/ideas needed: "Themes" User Interface

Post by Meetlat »

Nice! Perhaps the theme selector can be a bit more visual. Perhaps a small preview image? Or is that something you will integrated in the 'manage themes' page?

For example I liked what Petrikas made here: https://forum.freecadweb.org/viewtopic. ... 20#p489527
Petrikas wrote: ping
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Feedback/ideas needed: "Themes" User Interface

Post by chennes »

Meetlat wrote: Wed Apr 28, 2021 8:03 pm Or is that something you will integrated in the 'manage themes' page?
Right -- "Manage Themes" will open the Add-On manager to the new "Themes" tab, which will display whatever the Theme designer wants (basically). Screenshots, etc. It just sucks in the theme's repo README.md.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Feedback/ideas needed: "Themes" User Interface

Post by Zolko »

chennes wrote: Wed Apr 28, 2021 7:14 pm applying a theme is a one-shot update to your preferences, which you can then customize as much as you like, and potentially save as a new theme.
...
Hence this post: I'm looking for feedback and/or ideas for how to improve it before I submit the PR.
This is a feature I've been wishing for some time ... IF it also includes toolbars, panels, macros and such things. Could even propose to download a list of workbenches that the user has set-up. In this way, one could spend some time optimising the UI, knowing that the time is not wasted because it can be re-used on any new install.

NX CAD has this "save user config" function (and corresponding "reload"). Would that be doable for FreeCAD ?
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Feedback/ideas needed: "Themes" User Interface

Post by chennes »

Zolko wrote: Wed Apr 28, 2021 8:17 pm IF it also includes toolbars, panels, macros and such things.
Anything that can be stored in user.cfg can be in a theme. They also have the capability of running a pre.FCMacro and post.FCMacro when they are applied, so you can also include things that a macro can do. I made the system as flexible as I could without making the underlying code overly complex.
NX CAD has this "save user config" function (and corresponding "reload"). Would that be doable for FreeCAD ?
Yes - there is a "Save as new theme..." option in that drop-down menu that takes your current settings (or a subset thereof, defined by a set of template files) and stores it. I expect that's how most theme authors will go about making their theme (not counting the stylesheet part, which works the same as it always has).
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Feedback/ideas needed: "Themes" User Interface

Post by Bance »

I like the sound of this, I like the dark themes, but struggle to read some text colours against the background. I've tried changing the text colours but it's difficult to know exactly what is being changed. Link colours in the property view being an example.
User avatar
chennes
Veteran
Posts: 3877
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Feedback/ideas needed: "Themes" User Interface

Post by chennes »

What do you all think of them being called "Themes"? Alternatives that I can think of are "Preference Pack" or "Parameter Set" -- both are much more general, and I'd be worried that users wouldn't understand that the biggest use case if this idea of visual theming of FreeCAD. On the other hand, because of the way they work you could easily make different packs for, say, switching between unit systems, which of course the word "Theme" doesn't really cover.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
LarryWoestman
Posts: 98
Joined: Fri Oct 09, 2020 4:56 pm
Location: Oregon, USA

Re: Feedback/ideas needed: "Themes" User Interface

Post by LarryWoestman »

Personally, I prefer "Preference Pack" because it implies more than just a visual theme, which is all that "Themes" means to me.
bleber
Posts: 259
Joined: Thu Jun 30, 2016 5:12 pm

Re: Feedback/ideas needed: "Themes" User Interface

Post by bleber »

Some idea for ràpid theme switch? To maque a switch attaching some Macro to a icon for ràpid theme changing, or a workbench with t'he icons to change theme.

Ex. A icon with decimals units, other with imperial, other with night working other with 2 monitor theme, other with hight resolutions monitor, ......meny meny cases
Post Reply