Feedback/ideas needed: "Themes" (now "Preference Packs") User Interface
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Feedback/ideas needed: "Themes" (now "Preference Packs") User Interface
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: 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!
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: 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.
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Feedback/ideas needed: "Themes" User Interface
maybe you're interested in helping with the UI here?ChrisWesley wrote:
Re: Feedback/ideas needed: "Themes" User Interface
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
For example I liked what Petrikas made here: https://forum.freecadweb.org/viewtopic. ... 20#p489527
Petrikas wrote: ping
Re: Feedback/ideas needed: "Themes" User Interface
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.
Re: Feedback/ideas needed: "Themes" User Interface
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 ?
Re: Feedback/ideas needed: "Themes" User Interface
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.
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).NX CAD has this "save user config" function (and corresponding "reload"). Would that be doable for FreeCAD ?
Re: Feedback/ideas needed: "Themes" User Interface
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.
Re: Feedback/ideas needed: "Themes" User Interface
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.
-
- Posts: 98
- Joined: Fri Oct 09, 2020 4:56 pm
- Location: Oregon, USA
Re: Feedback/ideas needed: "Themes" User Interface
Personally, I prefer "Preference Pack" because it implies more than just a visual theme, which is all that "Themes" means to me.
Re: Feedback/ideas needed: "Themes" User Interface
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
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