5th to 11th of December 2022

Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++, and JavaScript. Find more information at https://slint-ui.com/ or go straight to github at https://github.com/slint-ui/slint

Spotlight

When implementing UI components that show text, you might've asked yourself the question: How do I set font sizes? The answer is, of course: It depends :-).

But what does font size depend on? It can be specific to the component - is the font used as a title, or just a little foot note label? Critically though, the size might also depend on other text in the application, and font size needs to be consistent with sizes used in other components.

The latest Slint release includes a new unit for relative font sizes: the rem unit that works like CSS and provides a scale factor that resolves relative to the root font size. In Slint this base is the default-font-size property of the root Window element.

You can now write:

Text {
    text: "Hello";
    font-size: 1.5rem;
}

and the font size will 1.5 times of the current value of `Window.default-font-size`. If `default-font-size` changes, the label's text will of course get re-rendered automatically.

Check out this Online Editor Example to see it live in action.

Slint UI library

Tooling

Changes to the .slint language

Fixes

Janitor Work

PRs: #1942, #1944, #1946, #1947, #1948, #1954, #1956, #1960, #1961, #1963, #1964, #1966

Statistics

60 patches committed in 20 pull requests by 3 authors.