As far as I can find in FreeCAD, we don't have any code that actually parses the metadata.txt file -- just code that scans it for a few key entries. Am I missing something?
I think so -- certainly at first, not all stylesheets will be wrapped by the Theme. And the action of the theme is to do more than set the stylesheet -- it will be possible to create a theme that doesn't affect the stylesheet at all, but (for example) just sets the colors of the console, or something like that. In this setup, "Theme" is just some arbitrary collection of user preferences.
chennes wrote: ↑Thu Apr 01, 2021 6:47 pm
I think so -- certainly at first, not all stylesheets will be wrapped by the Theme. And the action of the theme is to do more than set the stylesheet -- it will be possible to create a theme that doesn't affect the stylesheet at all, but (for example) just sets the colors of the console, or something like that. In this setup, "Theme" is just some arbitrary collection of user preferences.
True. I'm trying to wrap my mind around which one overrides the other.
chennes wrote: ↑Thu Apr 01, 2021 6:47 pm
I think so -- certainly at first, not all stylesheets will be wrapped by the Theme. And the action of the theme is to do more than set the stylesheet -- it will be possible to create a theme that doesn't affect the stylesheet at all, but (for example) just sets the colors of the console, or something like that. In this setup, "Theme" is just some arbitrary collection of user preferences.
So if a Stylesheet is present in the theme Style Sheet = none ?
Think of a Theme as a macro that sets a bunch of preferences (including the stylesheet). So anything you do after you hit apply on the theme still applies, including setting the stylesheet. We're not getting rid of the various preferences options, just giving theme creators an easy way of setting those options all at once.
(Aside: This is a little bit untrue because we have to have a mechanism for a theme to set value in workbenches that haven't been loaded yet, but it gets at the basic idea anyway.)
chennes wrote: ↑Thu Apr 01, 2021 7:25 pm
Think of a Theme as a macro that sets a bunch of preferences (including the stylesheet). So anything you do after you hit apply on the theme still applies, including setting the stylesheet. We're not getting rid of the various preferences options, just giving theme creators an easy way of setting those options all at once.
(Aside: This is a little bit untrue because we have to have a mechanism for a theme to set value in workbenches that haven't been loaded yet, but it gets at the basic idea anyway.)
chennes wrote: ↑Thu Apr 01, 2021 2:41 pm
The UI for this is pretty straightforward: here's a first take on it...
ETA: The "Apply" button becomes "Reapply" once a theme has been applied.
It would be nice to have a Please restart FreeCAD popup after changing themes or Style Sheet as Qss code in ProDark Theme (might be others) cannot update certain elements without restarting (i.e. url link colors)