13th of June 2022 to 19th of June 2022

Slint UI Library

By the time you are reading this we will be traveling to Embedded World 2022 in Nuremberg from 21st to 23rd of June. Stop by at booth 4-302 if you happen to be there, too!

New Features

  • Add ability to put the assets in the flash (#1367)
  • Enable panic-probe by default for stm32 (#1345)

    The ft5336 crate enforced the panic-semihosting for no apparent reason, but this is fixed upstream now.

Performance improvements for micro controllers

  • rp2040 backend: use DMA to send pixels to the screen via SPI (#1344)

    This makes the screen refreshing must faster.

  • Enable the data cache for stm32h7 (#1343)

    This requires us to flash the cache before swapping the frame buffer pointer.

    With slide puzzle span drawing with image tiles goes from ~100ms down to ~50ms, and theme switching between simple and berlin from ~140ms to ~72ms.

    This is with the line renderer.

  • Bump system clock frequency on stm32h735 (#1341)

    Up to 400 Mhz seems to work. Also fixed assert to match the octospi controller for the hyperram (1 instead of 2).

    I get asserts in the stm32h7 crate above that, although the data sheet says the CPU can go up to 550Mhz.

  • swrenderer: Optimize image drawing by using premultiplied colors (#1339)
  • Make the Pico use interrupts and make it sleep (#1337)

    This makes the the Raspberry Pi Pico sleep when nothing happens and wake it with interrupts/events.

    I cannot compare the performance to the previous code since I only own one pico with the display. Perhaps you can check it for (visible) performance/responsiveness regressions by comparing it side by side with the old polling code?


  • swrenderer: clip glyphs to the text element's geometry (#1356)

    This ensures that the partial renderer updates correctly and this also fixes a panic in the printer demo on the stm32h7 when opening the format combobox in the scan page:

    We would attempt to render the word "JPEG" with a font size of 12 pixels. The letter J has a height of 12 pixels, like the font ascender reported, but it's y coordinate is negative. That would also result in a negative text item relative origin for the glyph (target rect in physical pixels), which fails to convert to an usize and panics.

  • Fix panic when clicking on an open printer queue in the printer demo … (#1338)

    …with the partial renderer

    When computing the dirty regions, the call to geometry() might end up querying a value that's computed by the layout. For the layout computation we might end up calling ensure_updated() on a repeater, which then might destroy components. The destruction involves freeing cached dirty rectangles (via free_graphics_resources), and that also requires a write access to the cache. So after retrieving the property tracker for the dirty geometry, drop access to the cache before calling geometry().

  • MCU: Fix width of the text not including white-spaces (#1355)

    When concatenating two fragment, we should account for the trailing white-space in the previous fragment in the total width.

    This fixes the "l" of "Ink level" not being drawn properly in the printer demo with the partial renderer if the Text item (which is too small as a result of this bug) does not overlap the dirty region, but part of the text still need to be drawn outside before it overflows

  • mcu pico: fix the screen artifacts by re-implementing display-interface-spi (#1353)

    The display-interface-spi crate the not flush the internal fifo between the write and the changes of the CS and DC pins, which result of changing these pins before the screen receive all the data over the spi and causes artifacts on the screen.

    So re-implement the logic in our crate and use transfer instead of write which flushes the fifo correctly.

  • Use prettyplease crate to do the formatting (#1347)

    This fixes compilation of generated Rust code when token stream contains single-quoted semicolon.

    When using glyph embedding, we generate a character map where each code point is a literal char. When the font contains a semicolon and we generate an entry for that, we write ';' and the CodeFormatter would think the semicolon is the end of a statement and produce a newline. That breaks the build of the generated code.

    Replace the hand-written formatter with the use of the prettyplease crate.

  • mcu: glyph embedding fixes (#1346)

    Fix missing glyphs in the slide puzzle by implementing crude font fallback handling for macOS and Linux and making sure that we also embed any custom imported fonts.


  • Polish the microcontroller version of the printer demo ( #1361, #1360, #1359, #1358, #1357, #1350 )

    Polish icons and visual aspects of the printerdemo_mcu.

Janitor work

PRs: #1352, #1351


37 patches were committed in 21 pull requests by 4 authors.

← Next : 20th of June 2022 to 26th of June 2022 | Previous : 6th of June 2022 to 12th of June 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