How to access style icons via std-widgets.slint #5234
-
I'm currently working on an application that needs a scrollable combobox, so I wrote a custom widget with a bit of inspiration from @ogoffart in #2657. But how can I use the stylized icons in my custom widget? I could just download them and use them on my own, but if I switch the style/theme from Fluent to Cosmic, the icons would look off. Internally, they are already defined in, for example, Fluent style as an additional palette: https://github.com/slint-ui/slint/blob/28c6b8d0ba995eeb3ea053af50b76a7c89e6e97f/internal/compiler/widgets/fluent-base/styling.slint So, how do I import them into my widget? Correct me if I'm wrong, but there isn't an easy solution, or is there? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, For my custom widget set I provide a subset of the |
Beta Was this translation helpful? Give feedback.
I'm confident we will find a proper way for the icons in the future. Yes you can check the
Palette
global fromstd-widgets
https://releases.slint.dev/1.6.0/docs/slint/src/language/builtins/globals.html#palette. It provides you different widget/control brushes for the current selected style. We will make more styling resources public soon like font settings.