5th to 11th of December 2022

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

  • VSCode and online editor: Remove bindings in properties view via the LSP (#1962)

Changes to the .slint language

  • Support declaring functions (#1935)
  • Add support for the export * from syntax, that allows re-exporting types from other modules (#1939)

Fixes

  • online editor: Fix preview not showing in Safari (#1949)
  • LSP: Fix LSP blocking when run from VSCode (#1958)
  • Fix build of skia-opengl on macOS and Windows (#1941)
  • Fix in/out/private property on globals (#1951)
  • Fix panic in the interpreter when evaluating init in a layout (#1952)

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.

← Next : 12th to 18th of December 2022 - 0.3.3 Release | Previous : 28th of November to 4th of December 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