July 18, 2024 by Slint Team

Slint 1.7 Released with New Widgets, Multi-Window Support, and Live-Preview RedesignBlog RSS

Slint is a modern UI toolkit with its own domain-specific language (DSL) designed for creating responsive and intuitive user interfaces.


Date & Time Picker Popup Widgets

Use the new DatePickerPopup and TimePickerPopup widgets to let your users enter dates and times. These widgets adhere to the Material Design and are available cross-platform.

This work is being funded by NLNet. We're very grateful for their support.

Multi-Window Support

Now you can declare multiple components for export to your application code, for use with multi-window applications:

import { StandardButton, Button } from "std-widgets.slint";

export component SettingsDialog inherits Dialog {
    title: "Settings";
    // ...
    StandardButton { kind: ok; }
    StandardButton { kind: cancel; }
}
export component MainWindow inherits Window {
    callback show-settings();
    // ...
    Button {
        text: "Show Settings";
        clicked => { root.show-settings(); }
    }
}
slint::include_modules!();

fn main() -> Result<(), slint::PlatformError> {
    let main_window = MainWindow::new()?;
    main_window.on_show_settings(|| {
        let dialog = SettingsDialog::new().unwrap();
        dialog.show().unwrap();
    });
    main_window.show();
    slint::run_event_loop();
}

Live-Preview Redesign

Live-Preview has undergone an overhaul: We've realigned the toolbar, redesigned the component library, and added a brand new property editor. Take it for spin and let us know what you think.

Bug Fixes and Enhancements

This release includes several bug fixes and new APIs, some of which were contributed by valued community members:

  • Fixed hiding windows on Wayland (#4225)
  • LinuxKMS: Added support for software rendering and legacy framebuffers.
  • Software renderer: Added set_rendering_rotation() to rotate the buffer by multiple of 90 degrees.
  • Skia renderer: Fixed dithering on gradients. (#5482, thanks to wkb)
  • Added resize-border-width to Window. (Thanks to Luc Fauvel)
  • Added char-wrap variant to the TextWrap enum. (#5381, thanks to Daniel Stuart)
  • Support for rotating text via rotation-* properties (only with FemtoVG, Skia, and Qt)
  • Fixed ComboBox's current-value not updating when changing model or current index.
  • C++: Added LIBRARY_PATHS option to slint_target_sources() CMake function.
  • Rust: Added Image::to_rgb8()/to_rgba8()/to_rgba8_premultiplied() to obtain pixels for a slint::Image
  • Rust: Added Window::take_snapshot().
  • Rust: Various improvements to compilation times of generated code.
  • Node.js: Added support for invoking functions declared in Slint.
  • Updated to Winit 0.30, AccessKit 0.16.

For a complete list of changes, check out the ChangeLog.

Upgrading to Slint v1.7

To use the latest version, follow the instructions below for the programming language of your choice:

  • Rust developers: Run cargo update to bring your application up-to-date.
  • C++ developers: If you're using FetchContent with CMake, update the GIT_TAG entry in CMakeLists.txt to v1.7.0 or release/1.7 for automatic tracking of 1.7.x releases.
  • Node.js developers: Run npm update slint-ui to bring your package.json up-to-date.
  • ESP-IDF developers: Run idf.py update-dependencies to bring your idf_component.yml up-to-date.

Conclusion

A shoutout to everyone who contributed, especially the contributors from the community. Slint 1.7 continues our series of incremental updates that add new features while maintaining backwards compatibility.

If you're new to Slint, check out our Get Started section.

As always, we welcome your feedback, bug reports, and questions on our bug tracker, forum, and chat. Your input drives our continual improvement and innovation.


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.