July 6, 2022 by The Slint Team

Slint 0.2.5 ReleasedBlog RSS

Today we're releasing Slint version 0.2.5, with new features and some bug fixes. This release maintains backwards source compatibility. Applications developed with previous releases in the 0.2.x series will continue to run with version 0.2.5. Let's look at the highlights:


Slint 0.2.5

VS Code Web Extension

We're bringing our Slint VS Code extension to Visual Studio Code for the Web. Install the extension to get the same syntax highlighting, code completion, and live-preview - running in your web browser.

The Slint Language Server is written in Rust and runs as a separate process. We cross-compile the server now to Web Assembly, run it as a Web Worker, and substitute the stdin and stdout channels with a message-passing bridge. This is how code completion, diagnostics, semantic syntax highlighting, and more become available in the web extension.

The live-preview shows a window from within the Slint Language Server process. We can't show a window from a Web Worker, so instead we now create a "webview" to embed Slint cross-compiled to Web Assembly and with our WebGL renderer enabled. That's the same engine that we're also using for our preview of snippets in the documentation.

To use the extension, open a .slint file in vscode.dev or github.dev. For example, you can open our printer demo in your web browser, install the Slint extension from the extensions tab in the side bar, and then enjoy the live-preview and code completion.

Editing a .slint file on the web with our web extension for Visual Studio Code

Accessibility Support

It's important to us that Slint applications can be used by everyone, especially users that require assistive technology. This version of Slint adds support for making applications accessible on the desktop.

Screen reader in Slint (needs sound)

You can now annotate your items with accessible properties, to make them interact well with software like screen readers or braille terminals.

Our widgets use these accessible properties for an improved out-of-the-box experience.

The run-time library exposes a tree of items and their accessible properties to the operating system's accessibility layer. This is done with the help of Qt, which supports the major desktop platforms. We will add other back-end implementations in the future.

Known Limitations

  • Text input fields are not accessible yet. This requires more annotations and support for accessible actions.
  • Relations between objects aren't implemented yet.

What's next?

  • We intend to improve the widgets to be more keyboard friendly and add more accessible properties where that makes sense.
  • Different accessibility back-ends so that we don't have to rely on the presence of Qt.

Smaller, Noteworthy Features

  • In Rust, use the new FilterModel or MapModel to transform any existing slint::Model. These adapter models update automatically when the underlying source model changes.
  • In addition to @linear-gradient() it's now also possible to specify radial gradients with @radial-gradient(circle, ...).
  • Use the new read-only property with the text editing widgets LineEdit, TextEdit, and TextInput to stop them from accepting input.
  • Code completion now also offers components that haven't been imported yet. Accepting the completion will add the necessary import statement.

For a detailed list of all changes, check out the CHANGELOG.md

Conclusion

Thank you to everyone who contributed, especially the numerous external contributors.

We hope that you'll enjoy upgrading to this new version. If you're using Slint with Rust and Cargo, just run cargo update to update your application to the latest release. If you're using our CMake integration with FetchContent, update the GIT_TAG entry in your CMakeLists.txt to specify either v0.2.5 or you can also use release/0.2 to automatically follow all 0.2.x releases.

If you run into any issues or notice missing functionality, please don't hesitate to let us know. We would love to get your feedback. You can get in touch with us via our GitHub site, email, or via chat on our Mattermost instance.


Comments

Slint is a Rust-based toolkit for creating reactive and fluent user interfaces across a range of targets, from embedded devices with limited resources to powerful mobile devices and desktop machines. Supporting Android, Windows, Mac, Linux, and bare-metal systems, Slint features an easy-to-learn domain-specific language (DSL) that compiles into native code, optimizing for the target device's capabilities. It facilitates collaboration between designers and developers on shared projects and supports business logic development in Rust, C++, JavaScript, or Python.