Replies: 3 comments 3 replies
-
Hi @Blquinn, short answer: yes it is possible but there is no build in mechanism to access the resources yet. Long answer: for each style you can find a If you looking e.g. for the material styleing file you can check in the repo: We want to make theses resources per style accessible trough a public api in the future. |
Beta Was this translation helpful? Give feedback.
-
I've created an issue for your request: #3687 |
Beta Was this translation helpful? Give feedback.
-
The undocumented way to do it right now is to use StyleMetrics
And the following variables are available on it: slint/internal/compiler/widgets/fluent-base/std-widgets-impl.slint Lines 14 to 25 in d9672c5 This is not documented, but we even use it in our examples, so i guess this is public interface by now. |
Beta Was this translation helpful? Give feedback.
-
I was wondering if there is any way to get variables from the currently applied style in slint.
For example can I use the style's background color in my own slint files? It would be difficult to make the theme consistent without such a mechanism. I can't find a reference to anything like that in the docs.
I was also wondering what the process for creating a custom style, potentially one that is based on another style, like material, would look like. Is such a thing possible at the moment?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions