Closed ogoffart closed 11 months ago
For 2. the current detection of whether the Qt is done:
SLINT_DEFAULT_STYLE.txt
hack in the backend-selector, then slint-build/lib.rs and slint-macro/lib.rs read that fileThe problem is that i-slint-compiler doesn't depend on the runtime (obviously) so it is a bit hard to do all in one place. But under the new system i was thinking we could read SLINT_DEFAULT_STYLE (which we could rename to something else) to resolve the "native" alias around https://github.com/slint-ui/slint/blob/master/internal/compiler/typeloader.rs#L101 that would help with rust and the interpreter, but not with C++ as the compiler and the runtime are build in different targets. We'd need a way to tell the compiler what features are enabled.
Can you elaborate what information exactly the compiler needs in the C++ case that it currently doesn't have access to?
Currently, in C++ we pass --style ${_SLINT_STYLE}
to the compiler.
After talking about it, we decided to go with fluent on wasm because it looks better than material.
Currently, in C++ we pass --style ${_SLINT_STYLE} to the compiler
Yes, the point is that I'd like the default style selection (what "native" alias to) not to be in the CMakeLists.txt anymore. But in a central place in the compiler. We still need the information whether the Qt style is available though.
Change the backend selector Cargo.toml to disable qt as the default backend on win and mac
We would need to find a way to have a feature enabled by default only in some targets
It would be great if you could use native theme styles without relying on Qt.
It would be great if you could use native theme styles without relying on Qt.
That's the idea, on all platform but Linux. Only on Linux we'll keep using the Qt style as a native style because Qt is native there (at least on KDE Plasma). If someone wants to write a GTK style, or an adwaita style ( https://github.com/slint-ui/slint/issues/2566 ) we could also use that.
Does anyone happen to know how you can manually change the style in your app? For example, if I want to use Material style everywhere, even on MacOS and Windows? (Hopefully it's okay to ask that here)
@circlePulse This should be explained there: https://releases.slint.dev/1.6.0/docs/slint/src/advanced/style#selecting-a-widget-style-with-rust
(It's okay to ask here, but the best is to use the GitHub discussions for questions)
"material""fluent" on wasm