12th of September 2022 to 18th of September 2022

Slint UI Library

We are proud to announce version 0.3.0 of Slint, which we released last week! Details can be found in the release blog. So this week has lots of polish to various areas, the documentation and the online editor and adds some minor last minute changes to our public APIs.

New features

  • winit: Set the icon from the builder (#1631)

    Also simplify the code that sets the property to the builder

  • Improve MCU documentation (#1624)

API Changes

  • Change logical/physical position and size of window (#1620, #1629)
    • Add RequestedSize and RequestedPosition enum to enable asking for logical or physical size/position.
    • Rename Window::size() to Window::physical_size()
    • Make Window::set_size(...) take an Into<RequestedSize>
    • Rename Window::position() to Window::physical_position()
    • Make Window::set_position(...) take an Into<RequestedPosition>
    • Change WindowAdapter and related classes to be able to handle requests being made in the either physical or logical units.

    Implement this for C++, Rust and node.

Fixes

  • Add a 100ms delay before forwarding the event in a Flickable (#1652)

    An annoying visual bug when flicking over a ListView with item that has a special effect on pressed is fixed, where the items would show "pressed" for a brief instant. This patch add a small delay before sending the press event to the children.

  • interpreter: Fix unregister_component called with the wrong pointer (#1641)

    We need the pointer that's in the VRc used when registering the items in the cache.

  • Winit: fix entering of character containing dead key (#1628)

    The regression happened when upgrading winit as they added support for IME

  • Fix the initial window size when the height depends on the width (#1623)

    We need to assign the width before computing the preferred height otherwise zero or a very small value can be assumed and it will case the text engine return a huge preferred height.

    Testcase:

    export App := Window {
    VerticalLayout {
        padding: -10px;
            Text {
                text: "Lots of text with\nnewlines etc.\n lorem ipsum dolor sit amet";
                wrap: word-wrap;
            }
        }
    }

    In particular, this fixes the gallery window size being too high when using the skia renderer, because when given a zero width, skia return a big size for the height, (contrary to the Qt backend that consider 0 as infinite, or the femtovg backend that will stop rendering once a line can't fit)

    Replaces #1621

Tooling

  • online_editor: Make preview bigger by default (#1639)

    Make the online editor preview default to something bigger!

  • online_editor: Fix files from an old project getting added to a new one (#1638)

    When switching from a multi-file demo to another demo while the files are still getting loaded, the files from the "old" demo were added to the editor state as they became available.

    Fix this by keeping an "edit-era" in the editor that gets incremented whenever all documents are cleared. Pass this current era into the callback that handles file loading. Only add files once they are downloaded if the eras still match up.

  • Fix races in the online editor (#1637)
  • online_editor: Mark Welcome widget as closable (#1635)

    Mark the Welcome page in the online editor as closable.

  • Interpreter: fix the window icon and title not being updated (#1630)

    Window::show calls apply_window_property, and that's not called if one directly call the WindowAdapter::show

  • Skia: fix the cursor computations (#1627)

    Skia understands glyph offsets, not byte offsets, so the conversion must be made

Janitor work

  • Fix editor integrations link (#1658)

    Thank you to Joshua Goring for this pull request!

  • TextInput: Change the mouse pointer to the Text cursor on hover (#1653)
  • Don't depend on clap in wasm build (#1651)

    We don't use it anyway when building on wasm. A recent update of the textwrap crate to depends on the terminal_size crate which itself depends on the errno crate that doesn't build with wasm. So this should fix the CI

  • Clean up our CI setup a bit (#1650)
    • Run shared workflows from the current branch, not from master
    • Make sure OS names are lowercase as specified by github
    • Create and use a custom action to set up rust for us and use that throughout the workflows
  • Refactor the mouse handling (#1648)

    Just make a single recursive function, it is easier to read than using the visitor helper with a post and pre visit.

    Also remove that function that visits with a post and pre visit as it is no longer used

  • Bump version number to 0.3.1 (#1646)
  • github: Use slint 0.3.0 as basis to run updater_test (#1645)

    No need to test the versions in the 0.2 range since the updater hasn't changed much in that time.

  • Rename RequestedSize to WindowSize and RequestedPosition to WindowPosition (#1640)

More PRs: #1622, #1632, #1633

Other crates

document-features

  • Released version 0.2.5 of document-feature, adding a way to configure the style of the feature label with the feature_label= option

Statistics

78 patches committed in 25 pull requests by 4 authors.

← Next : 19th of September 2022 to 25th of September 2022 | Previous : 5th of September 2022 to 11th of September 2022


Slint is a declarative GUI toolkit to build native user interfaces for desktop and embedded applications written in Rust, C++, or JavaScript. Find more information at https://slint.dev/ or check out the source code at https://github.com/slint-ui/slint