- Metadata: One Standard to Rule Them All
- Need Help on populating user colors with Stylesheet change
- Feedback/ideas needed: "Themes" (now "Preference Packs") User Interface
This came about while thinking about "Themes" -- it turns out that just having a Qt Stylesheet isn't enough to create a nice-looking unified UI for FreeCAD -- there are many places where colors and fonts, etc. are controlled by user preferences as well. Think of the 3D viewing area background color, or the text colors in the console, for example. So to make a good-looking, functional "Theme", we need some way of distributing both a stylesheet and a set of updated user preferences (to eventually include even things like icons as well).This PR adds a system for storing and applying sets of user preferences called "Preference Packs". These are intended to give users the ability to make bulk modifications to their FreeCAD setup by applying one or more of these packs. The packs are designed to be distributable, and to that end this PR introduces a new type of metadata file, "package.xml". Anything that can be stored in the user.cfg file can be stored in a Preference Pack.
Beyond themes, there are sets of preferences that control things like how numbers are displayed, or the unit system, that really require setting multiple preferences across multiple workbenches. Someone could write a preference back that changes all of those at once. Or maybe the layout of the various content areas and toolbars optimized for particular display shapes or resolutions. Plus I'm sure many things I'm not even thinking of.
I'm particularly interested in making sure to get feedback on the metadata.xml file before merging, since this will (hopefully, in the long run) improve our addon distribution process, and that affects a lot of people. I'm also interested in knowing which preferences you'd most like to see included in the template files that the system uses to make it easy to save your own custom preference packs (see the "Details" section of the PR for more information on that). Obviously if you're feeling up for a code review, go for that as well!
(Potential) Future work not included in this PR:
- New section in the AddOn Manager to download these packs
- The AddOn manager can be modified to provide much more info about addons based on the contents of the metadata.xml file
- More variables added to the Template files for easier pack creation
- More things in FreeCAD can be modified to be controlled by (potentially hidden) preferences, allowing customization from a Preference Pack