25th of July to 1st of August 2021

Progress

Progress was made in the following areas:

  • Text Rendering Fixes:
    • Fix rendering of text selection with combining characters and ligatures with the GL backend (d867d7)

      When the text selection end follows right after a grapheme that uses multiple code points, then there may not be a matching glyph with the byte index. Therefore we wouldn't set the selection_end_x and draw incorrectly. Take the visual tail of the last glyph then.

    • Fix cursor navigation when using combining characters (17b3fb)

      The cursor navigation left/right (and subsequently text selection) needs to respect grapheme boundaries. Since we already depend on the unicode-segmentation crate through femtovg, we might as well use the functionality for determining grapheme boundaries from there.

      The only place where the cursor navigation is allowed to break that is when using backspace, as that allows the user to break glyph clusters.

    • Fix cursor rendering with the Qt backend for non-ascii text (35541c)

      We calculate the cursor position as byte offset in the utf-8 encoded string, while Qt expects an index in the utf-16 encoded QString. When those differ, the cursor is rendered at the wrong location.

      Fixes #363

  • Compile time improvements for the generated code
    • Rust: Speed up compilation times of generated code (b3529d)

      The binding setup functions (set_binding, set_animated_binding, etc.) are taking the binding basically as an impl Fn() -> T, which means each call site creates a new copy. The bodies of these can be quite big. Since most of our uses follow the pattern of capturing the same variables, we can reduce the number of copies needed by providing wrappers.

      With rustc 1.54.0 / debug profile total LLVM lines goes from 2079842 down to 1134237.

    • Another minor reduction in generated code (52aee8)

      Move the strong/weak reference dance into the API crate out of the generated code.

      Saves ~21k LLVM lines on the printer demo (debug).

      It's also possible to move the as_pin_ref() bit, but that didn't really give any savings overall.

  • New features:
    • Add a changed callback to Slider (90cdb5)

      Closes #125

    • Add support for the visible property (b0b391)
    • Allow the clip property to be a dynamic property (bd52f4)
    • Add support for icons in the Button widget (14c681, aacb47)

    • Allow angle and duration in the public API (be37a9, 7f611d, fae6e0)
    • C++: Expose conversion between Value and Image (07bf09)

      Closes #350

  • Fixes to the .60 language:
    • Don't error on empty documents (6a32a8)
    • An empty sixtyfps! macro should compile (188806)
    • Produce an error message when using if or for in grid layouts (e8727e, be05b5 )

      An early error is better than a build error at compile time of generated code.

    • Fix the scope while resolving a model expression (74bc95)

      The self was always referring to the root instead of the enclosing element.

  • Fixes:
    • Fix build compilation errors in the Figma importer (f1f9ff)
    • Rust: defaults to the native style when Qt is available (782192)

      This requires some gymnastics to get right as the information need to be passed to the compiler despite having no direct dependency between the compiler and the runtime or backends. So use a file in the build directory to tell the default style.

      cc: #83

    • Proper .60 compilation error when changing a property linked with a two way binding in a state (e0fad7)

      Instead of generating wrong code or panic.

    • Fix panic or invalid code caused by invalid expression in the tree (f544e6)
  • Reduce clippy warnings in generated code. We want this code to be clippy clean!

    Changes: a2e800, 3aa0b7, 3f716a, 11bc09

  • Demos and Examples
    • Make the circledraw example look a bit better by default (b87ae8)

      Give it a default size.

    • Mention forward-focus in the FocusScope example (85e2cf)

      This makes the example a bit more useful out of the box, at least to let the user know that this property exists.

    • cargo-ui:
      • Show the warning/error stats after building/checking (4c7f29)
      • Fix clippy warnings (89ac68)
      • Only show packages selection for workspaces (015ffa9)
      • Allow calling cargo-ui with a path to a Cargo.toml or a directory (e7d218e)
      • Add a dependency tree visualization99207b6)

      • Various UI tweaks
  • Janitor work: More work to make sixtyfps clippy clean

    Changes: 85f7c9, f1f018, e5bb77, ec7b7f, f7f5a3, 34d461, f9f05c, b5e0d9, 539e15, b45aa8, 2b5bad, fd26dd, 43e073, dbdd8d

Statistics

51 patches were committed by 5 authors.

← Next : 1st of August to 8th of August 2021 | Previous : 18th of July to 25th of July 2021


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