Skip to content

How to implement (and use) custom themes for std-widgets.slint? #7232

Answered by ogoffart
Reverier-Xu asked this question in Q&A
Discussion options

You must be logged in to vote

Is there some way to implement themes like fluent or cosmic without monkey-editing slint's source code?

The way this was designed is that one would adapt the include path so that "std-widgets.slint" point to your own.
But in practice this is hardly possible because the styles now rely on some internal that might not even be accessible.
This is tracking in issue #45 , but we are currently not really working on that.

Regarding the ListView question, the ListView has special handling in the compiler so that at runtime, a special layout function is called:

pub fn ensure_updated_listview(

This works by just matching the name…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Reverier-Xu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants