You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having to add styles and themes entries programmatically is bad. They need to be loaded externally from XML files, called "stylesheets". Every built-in view should have its own stylesheet for clarity.
A "theme" is now the result of loading all "stylesheet" files.
The need is for users to:
redefine styles of built-in views
create their own theme from scratch
add theming features to their own custom views
At first, it should be a 1:1 of what we have in the code, aka:
Declare a theme (for now there is only one "brls/switch" one)
For each variant, declare colors and metrics
By default, all apps use the "brls/switch" theme unless specified otherwise by the user
The API should stay roughly the same to quickly load theme values in the code and in XML files
So for instance, each built-in view's stylesheet can look like this:
Users can redefine the style by overriding values for the "brls/switch" theme. The final "theme" is the aggregation of all stylesheets, first the built-in ones then the user ones on top of it.
So one challenge is how to build a full theme in one go when the app inits, while having multiple stylesheet files on both the filesystem AND scaterred around the code (for built-in views, I don't want them in XML files and I don't want one big theme file either as we currently have).
Rough summary:
Declare colors in XML files (current "theme"), from both hex and rgb(a) formats
Declare metrics in XML files (current "style")
Find a way for every built-in view to have its own stylesheet while still being embedded in the code (I don't want any built-in XML file in the resources). Built-in styles should ALWAYS be lower priority than user defined styles, since they can redefine values to recolor built-in views.
Remove the unclear "theme" terminology from the code and @theme type in XML files - a theme is now a collection of metrics and styles for both light and dark variants. We have "colors" and "metrics" now.
And THEN we can imagine more features like inheritance between themes... but that can be kept for later.
The text was updated successfully, but these errors were encountered:
I think instead of calling the default theme brls/switch, it should be renamed to brls/default since GLFW still uses themes, just default to the light theme.
Having to add styles and themes entries programmatically is bad. They need to be loaded externally from XML files, called "stylesheets". Every built-in view should have its own stylesheet for clarity.
A "theme" is now the result of loading all "stylesheet" files.
The need is for users to:
At first, it should be a 1:1 of what we have in the code, aka:
So for instance, each built-in view's stylesheet can look like this:
Which would be equivalent to the current C++ theme and style:
Users can redefine the style by overriding values for the "brls/switch" theme. The final "theme" is the aggregation of all stylesheets, first the built-in ones then the user ones on top of it.
So one challenge is how to build a full theme in one go when the app inits, while having multiple stylesheet files on both the filesystem AND scaterred around the code (for built-in views, I don't want them in XML files and I don't want one big theme file either as we currently have).
Rough summary:
@theme
type in XML files - a theme is now a collection of metrics and styles for both light and dark variants. We have "colors" and "metrics" now.And THEN we can imagine more features like inheritance between themes... but that can be kept for later.
The text was updated successfully, but these errors were encountered: