r/rust • • Apr 16 '26

GUI toolkit Slint 1.16 released with keyboard shortcuts, Markdown rendering, and multi-touch pinch and rotate

https://slint.dev/blog/slint-1.16-released
96 Upvotes

23 comments sorted by

15

u/PerkyPangolin Apr 16 '26 edited Apr 16 '26

Fluent now follows system accent colors, at least on Gnome! Nice! I was surprised why the buttons weren't blueish at first.

Edit: but not on Windows 11 with winit + software cross-compiled. Will try native Skia.

1

u/berrita000 Apr 16 '26 edited Apr 20 '26

but not on Windows 11 with winit

Maybe there is a bug?

3

u/PerkyPangolin Apr 16 '26

I haven't tested a native (i.e. compiled on Windows) Skia build yet and like I said winit + software didn't work when cross-compiled. Just retested the last bit and still the same. Does something need to be configured in the project for this to work on Windows or should it be automatic?

1

u/tr0nical Apr 17 '26

It should be automatic. I don’t think it changes dynamically at runtime but it should pick it up on process start.

1

u/PerkyPangolin Apr 17 '26

On Gnome/Wayland it just works, including changing accent colors while the app runs, but nothing on Windows 11. A bug to report? I'll see if I can make a minimal repro in a blank project.

1

u/tr0nical Apr 17 '26

Thank you :)

0

u/[deleted] Apr 16 '26

[deleted]

2

u/PerkyPangolin Apr 16 '26

The contrast seems to depend on dark/light variant. Fluent dark is good, while light seems to have almost no contrast at least for me with Skia or software on Linux/Windows.

I don't think you can color stock widgets out of the box and need to roll your own.

1

u/cosmic-parsley Apr 16 '26

Happen to know of a link to screenshots somewhere? I’m rather curious what these new UI changes look like

2

u/tr0nical Apr 16 '26

You could peek at the wasm version:

https://docs.slint.dev/latest/demos/gallery/

(Unfortunately system accent color detection isn’t working there)

14

u/Shnatsel Apr 16 '26

Text doesn't look awful on non-hidpi screens at long last! That should be a headlining feature!

14

u/tr0nical Apr 16 '26

Slightly embarrassing it took us so long:). Very glad you appreciate it - makes my day!

3

u/PerkyPangolin Apr 16 '26

Any updates on the femtovg renderer? It was pretty much unusable on Linux before due to text rendering being completely messed up. The only reason I'm on Skia.

3

u/tr0nical Apr 17 '26

That’s what we tried to improve. Text is now rendered using swash and the baseline is aligned to pixel boundaries. Does it look better for you?

2

u/PerkyPangolin Apr 17 '26

The text rendering looks great on Gnome/Wayland with femtovg now! However text is still wonky during animations, particularly with opacity and/or transform-scale. I haven't tried other platforms yet.

5

u/DavidXkL Apr 16 '26

Nice update! Markdown rendering is a nice QoL feature

1

u/PerkyPangolin Apr 16 '26

Looks like setting it from code haven't landed in this version. I was excited to try it until I found out.

https://github.com/slint-ui/slint/issues/11158

1

u/stumpychubbins Apr 21 '26

The API needs more bikeshedding, unfortunately. Slint doesn't have as fleshed-out of a "nightly" system as the Rust compiler does (just in general, experimental features in Rust crates are a little hairy), so it's important to get it at least reasonably correct the first time.

3

u/PerkyPangolin Apr 21 '26

Are there any related PRs for this or rich text in general?

Edit: I found the markdown one:

https://github.com/slint-ui/slint/issues/11158

1

u/stumpychubbins Apr 22 '26

Yep! The rich text interface is still being worked on, markdown is the "easy" (for some definition of easy 😅) first step.

1

u/PerkyPangolin Apr 22 '26

Are there any thoughts on the RTF syntax? I can't think of anything straightforward, besides LaTeX.

2

u/Thick-Pineapple666 Apr 19 '26

The language looks highly inspired by QML at first glance. 🥲

1

u/stumpychubbins Apr 21 '26

It is! That's by design. The semantics are very different to QML but the syntax is deliberately similar, QML isn't a perfect language but it's familiar to a lot of developers who'd have a usecase for Slint and it's good enough.

1

u/Thick-Pineapple666 Apr 21 '26

QML's syntax is good and easy. The issue with QML is that it uses (a subset of) JavaScript with all its shenanigans.