Skip to content

v2.1.0

Choose a tag to compare

@mrhubbs mrhubbs released this 30 Oct 20:42
· 13 commits to master since this release
521c6cf

A few things to highlight...

  • Linux releases ship .AppImage instead of a .zip, so AppImage tools such as Gear Lever can install and update it.
    • The AppImage is now built with zstd compression and the new static AppImage runtime, which AppImageLauncher 2.x does not support. If you use AppImageLauncher, upgrade to version 3.x or uninstall it; otherwise the editor will fail to start with a "Squashfs image uses (null) compression" error.
  • macOS releases ship a notarized .dmg with the standard "drag to Applications" window instead of a .zip.
  • Compilation on Mac and Linux now you ninja instead of make - so you have to have ninja installed.
  • CLI: The command lved is now lvglpro. You can get it from npm: npm install -g @lvgl/lvglpro@latest
  • CLI: license tokens issued before this release no longer work and fail with "Invalid token".
    • Generate a new token from your lvgl.io/pro/account dashboard, and replace it wherever it is stored (--token, LVGLPRO_CLI_TOKEN, CI secrets).
  • Breaking on LVGL v9.6: global subjects are generated as pointers (extern lv_subject_t * subject_x;), created with lv_subject_create(). v9.4 and v9.5 are unchanged.
    • Custom C code must drop the &: lv_subject_get_int(subject_x) instead of lv_subject_get_int(&subject_x). Check custom C code that uses subjects when upgrading a project to v9.6.

XML Behavior Changes

  • <prop name="width"> no longer sets the widget's width. Component props now shadow the widget props they extend, so a component that relied on the old pass-through renders differently.
  • String truthiness changed. An empty string is now falsy in { }, so hidden="{!subtitle}" now hides when the string is empty. That changes behavior on device, not just in the Preview.
  • A component's own prop needs bindable="true" to be bound. Without it, the binding is now reported.
  • Subjects in C code are now exported as pointers. Any custom C code needs to lose the & when referencing subjects.

Generated code changed:

  • Permanent screens are now created in the init function.
  • LVGL v9.6 uses lv_subject_create().
    Easing callbacks are now declared in *_gen.h.
  • Hand-written code that depends on the old order or symbols may need changes.

Others

  • Preview and tests are blocked by an error in any file of the project. Test runs that passed before can now fail because of an unrelated broken file.
  • Stricter validation turns old warnings or silent passes into errors. This covers:
    • extending a component or mixing widget types across target views
    • <variants> inside <widget>
    • variant comparisons limited to ==/!= against the variant's own options (v9.6)
    • shorthands like pad_all in <animation prop>
    • <prop default> and #const type checks
    • trigger event names
    • missing assets in many more attributes
    • a non-subject passed to subject_set_*_event

Full Release Notes

Added

  • --target and --language options for the CLI screenshot command, to capture a screen on a specific project.xml target and in a specific language.
    • Example: lvglpro screenshot ./my-project screens/main_screen --target watch --language de
  • Linux CI checks that the packaged application's X11 window class matches its desktop launcher.
  • Style transitions: a <transition props="…" duration="…" delay="…" easing="…"/> child of a <style> is validated, autocompleted and exported (lv_style_transition_dsc_init()).
    • The composite names (pad_all, pad_hor, …) expand to the real properties; the ones LVGL cannot interpolate (fonts, images, gradients, enums, booleans) are reported.
  • easing on <animation> and <transition>: the built-in lv_anim_path_* names, bezier(x1 y1 x2 y2), or the name of an easing callback.
    • An easing callback is handled like an event callback: declared in <project>_gen.h, registered for the preview, and given a weak default that animates linearly until the application defines it.
  • && and || in { } expressions, with the XML-friendly AND / OR keyword spellings (& must be escaped in an attribute value).
  • LVGL v9.6.0: ==, !=, <, <=, >, >= also spell as EQ, NE, LT, LE, GT, GE, and &&/||'s own keyword spelling is now uppercase-only: AND/OR (the v9.5.0 lowercase and/or no longer apply from v9.6.0).
  • LVGL v9.6.0: two <variant>s may share an option name (e.g. both mode and size can have a normal option). A variant may be compared only with ==/!=/EQ/NE, and only against one of its own options; this is validated, and autocomplete after mode == suggests only mode's own options.
  • Autocomplete of subjects, variants and variant options inside { } expressions.
  • LVGL v9.6.0 support, via lvgl_version="9.6.0" in project.xml.
  • <style enabled="{…}">: switch a style on and off with a condition. The style is added once, so its priority never shifts.
  • <prop bindable="true">: backs the property with a per-instance subject, so it can be bound from outside and read in the component's own { }. Generates a setter and a getter.
  • A plain property inside a { } that reads a subject is snapshotted, so an instance can identify itself: hidden="{active_tab != index}".
  • <subjects> in a component or screen declares per-instance subjects. In globals.xml it still means one shared subject.
  • <set_subject_event>: value is an expression re-evaluated on every fire, so one element does toggle, increment and set.
  • trigger takes an event name or a {expr}: one that reads a subject fires on every false-to-true change, any other is decided once, at creation.
  • src="{icon}" drives an image from a <pointer> subject, compiled-in ones included.
  • SVG images in the Preview: a <file src_path="….svg"> image is decoded by the runtime. On LVGL v9.6, vector graphics, SVG and Lottie are enabled too (ThorVG).
  • Subjects panel:
    • Color subjects get a color field with a picker. A change reaches the Preview, and a change made in the Preview shows up.
    • A view's own <subjects> (LVGL v9.6) are listed and can be set; one shadows a global subject of the same name.
    • A global subject read in a { } expression is listed under "In this file".
  • Validation:
    • Only one <transition> per <style>: LVGL keeps the last one.
    • <animation prop> takes a style property LVGL can animate, not a shorthand such as pad_all; start/end are checked against it, and duration is optional.
    • A <prop>'s default is checked against its type, and a #const's value against the property it is used in.
    • A trigger that is not a { } is checked as an event name.
  • Autocomplete of the <animation> properties and values, content for sizes, true/false for a bool default, and local constants before the file is saved.
  • Mac Intel build of the CLI. :)
  • Hardware frame overlay: a <overlay image_src_path="…" viewport_x="…" viewport_y="…"> child of <display> renders a bezel image around the Preview, with the simulated screen positioned at viewport_x/viewport_y inside it.
    • <button_overlay name="…" help="…" key="…" x="…" y="…" w="…" h="…" color="…"/> children define clickable hardware buttons drawn on the bezel; clicking (or pressing/releasing) one dispatches the corresponding keyboard event to the simulated display, so hardware navigation/input can be tested without a physical device.
    • key accepts a single digit, a single letter, or one of the named keys (e.g. enter, arrow_left, arrow_right, esc).
    • overlay has an optional hidden="true" attribute to suppress the frame in interactive previews; it is always shown when calibrating from project.xml.
    • Example:
<display width="800" height="480">
    <overlay image_src_path="images/overlay_bezel.png" viewport_x="50" viewport_y="60">
        <button_overlay name="left" help="Navigate left" key="arrow_left" color="0x5A96FF" x="875" y="220" w="30" h="30"/>
        <button_overlay name="right" help="Navigate right" key="arrow_right" color="0x5A96FF" x="875" y="270" w="30" h="30"/>
        <button_overlay name="enter" help="Select" key="enter" color="0x5AD68C" x="875" y="320" w="30" h="40"/>
    </overlay>
</display>
  • <subjects> accepts a <color name="…" value="…"/> child, alongside int/string/float/pointer, generating lv_subject_init_color() (v9.4/v9.5) or lv_subject_create() + lv_subject_set_color() (v9.6+).
  • Optionally use your own emsdk install (found via EMSDK or PATH), instead of the Editor's managed emsdk install.
    • If your install isn't version 4.0.6, a warning is logged, the install prompt explains why, and the managed emsdk is used instead.
    • Applies to the Editor and the CLI.
  • E2E tests for how the app opens: signed out, signed in with or without a cached license, with a cached license the server rejects (straight to the license picker, without the editor showing first), and offline; plus losing the connection while signed in.
    • E2E builds (THEIA_E2E_AUTH_BYPASS) trust a test signing key, so E2E sessions verify offline like real ones; no other build trusts it.

Changed

  • Code and Design XML formatting share defaults: 80-column wrapping and one attribute per line. Code formatting still respects workspace configuration overrides.
  • CLI: The command lved is now lvglpro. You can get it from npm: npm install -g @lvgl/lvglpro@latest
  • CLI: license tokens issued before this release no longer work and fail with "Invalid token".
    • Generate a new token from your lvgl.io/pro/account dashboard, and replace it wherever it is stored (--token, LVGLPRO_CLI_TOKEN, CI secrets).
  • CLI: starts about 3x faster (--version 1.1 s to 0.3 s on Windows) and parses XML for code generation without building a browser window per file.
  • CLI: output is plain: no ASCII logo; routine messages (token validation, "resources up to date", file counts) only with --verbose; token retry notices on stderr; validation errors as path:line:col: message; the elapsed time on success.
    • Long steps such as building the Node runtime or updating resources still report progress.
  • New projects use LVGL v9.6 by default.
  • Breaking on LVGL v9.6: global subjects are generated as pointers (extern lv_subject_t * subject_x;), created with lv_subject_create(). v9.4 and v9.5 are unchanged.
    • Custom C code must drop the &: lv_subject_get_int(subject_x) instead of lv_subject_get_int(&subject_x). Check custom C code that uses subjects when upgrading a project to v9.6.
  • Per-instance subjects use lv_subject_create() on LVGL v9.6+; v9.4 and v9.5 keep lv_subject_init_*(), which is all they have.
  • Keyboard input is now enabled in the Preview! (and so is LV_USE_GRIDNAV). A default group is now created when the Preview starts. It attempts to preserve the currently-focused object between hot reloads.
  • Preview builds use Ninja on every platform; macOS and Linux used make. Ninja keeps each compiler message in one piece during a parallel build, while make interleaves them, and its fix (--output-sync) needs make 4.0, but macOS ships 3.81.
    • macOS and Linux users need ninja on the PATH, e.g. brew install ninja or sudo apt-get install ninja-build.
    • A missing ninja or cmake is named in a dialog, instead of offering an emsdk install that cannot fix it.
    • The compile progress bar follows Ninja's [12/40] step counter, so it shows a percentage on every platform, Windows included.
  • Signing in or out in one window now applies to every open window.
  • Linux releases ship .AppImage instead of a .zip, so AppImage tools such as Gear Lever can install and update it.
  • macOS releases ship a notarized .dmg with the standard "drag to Applications" window instead of a .zip.
  • The default responsive target(s) is/are set with <PROJECT>_COMPILE_TARGET in the user-editable <project>.h (default: all targets), and the runtime target starts from that value instead of always starting from all targets. <project>_set_target() still switches the target at runtime.
    • Existing projects keep their <project>.h, so they don't get the define. They still build with all targets; to choose targets, add #define <PROJECT>_COMPILE_TARGET ... above #include "<project>_gen.h".
  • Selecting a license is faster.
  • The Preview only shows XML from a valid project. While any file has an error, it keeps its last render, darkens, and names the error and its file.
    • Warnings never block it, and it catches up once when the project is valid again.
    • Tests follow the same rule: an error in another file of the project now stops them too, and the message names it.
    • A file outside any loaded project, or inside more than one, is blocked too, and the editor marks it on line 1.
    • The Preview waits for the project to load, and a reload (a saved file, a target change, crash recovery) waits until the project is valid.
  • The Preview updates very quickly while writing XML.

Removed

  • <lv_image bind_src="…"> on LVGL v9.6: use src="{subject}", which works for compiled-in images too. v9.4 and v9.5 keep bind_src.
  • @{ } bindings: use { }, which is re-applied whenever a subject it reads changes. The validator reports an old @{ } with that replacement.

Fixed

  • The launcher's Recent list could leave out the project that was just opened, when it was opened during startup.
  • CLI on Windows: a failed run (e.g. an invalid token) crashed on exit with Assertion failed: !(handle->flags & UV_HANDLE_CLOSING) and exit code 127 instead of 1.
  • CLI: a missing project.xml is reported before the license token is checked, and unexpected errors print their message instead of a stack trace; --verbose shows the stack.
  • CLI: no more punycode deprecation warning on every run.
  • XML child completion suggests unused built-in/custom widgets, components, and child operations such as style and bind_style, including partially typed tag names, while respecting project scope and child restrictions.
  • XML attribute-name completion preserves an existing assignment and value instead of inserting a duplicate ="".
  • { } expressions can be used in the <styles>, <consts>, <subjects> and <animations> sections, e.g. <style border_width="{gap * 2}"/> or <int name="gap_large" value="{gap * 3}"/>.
    • Those are computed while the component is registered, so only the constants and literals have a value; a property or a subject there is reported. if_target blocks are filtered first, so an expression sees the constants of the current target.
  • A style typed property is resolved in the scope of the component that passed it, in a { } expression too — it already worked with $. (A name attribute itself stays a literal or a single $prop / #const reference, so the Editor can check that the style exists.)
  • { } bindings on a component instance now also work for the properties it inherits from the widget it extends, e.g. <h3 text="{subject_title}"/> where h3 extends lv_label.
    • A component's own property needs bindable="true" to be bound; without it the property is used up while the instance is created, and that is reported.
  • A component property shadows the property of the same name of the widget it extends, so a <prop name="width" type="string"/> no longer sets the widget's width too.
  • A { } binding in a <widget>'s <view> exported an observer callback that was never defined, so the generated code did not compile.
  • <variants> in a <widget> is reported: a widget's behavior, and so its setters, belong to its C implementation.
  • The validator skipped every attribute whose value contains a single-quoted string, e.g. text="{'level: ' . level}".
  • A non-string expression on a text attribute is converted to text, so text="{count}" no longer passes an int to lv_label_set_text(). Ternary branches are converted too.
  • &lt; and &gt; in an expression are no longer rejected by validation; the entities are decoded first, as the runtime already did.
  • An int or float component property in an expression is stringified with %d / %.2f instead of %s.
  • Preview (LVGL v9.4 and v9.5): a malformed view no longer loads a NULL screen, and getrandom() works under Node and for requests over 64 KiB.
  • The Preview no longer rebuilds when the XML editor gets focus, nor restarts when the previewed file is saved, and it keeps its zoom when the XML changes.
  • Typing </ on its own line closes the tag at the opening tag's indentation.
  • The Inspector no longer loses the line of every element when an attribute value contains >.
  • Light theme: autocomplete matches have more contrast, and the Preview has its border back.
  • A #const of the file is offered and accepted in <style> values before the file is saved; one declared only in another component is reported.
  • The window title and file sidebar no longer stay stuck on the previous project after switching projects — they used to update only once a file was clicked.
  • Autocomplete no longer corrupts an existing XML attribute value when accepted while editing that attribute's key (e.g. it produced invalid XML like name=""="old value").
  • Linux/Ubuntu (X11): the running Editor now binds to its pinned taskbar launcher instead of showing a second entry with a generic icon.
  • Color subjects (<color> in <subjects>) are accepted by the validator and exported with lv_color_hex().
  • The launch screen no longer crashes when the license service omits licenseTier; a license without a displayName is shown as <Tier> License.
  • Permanent screens are created in the project's init function before the screen create calls run, so they can reference each other.
    • Extending a component or mixing widget types across target views is now reported as an error.
  • Converted fonts and images are regenerated when their generated file was edited after the last export.
  • Linux: the AppImage no longer requires libfuse2. Without it, the app used to exit silently on start (e.g. on a default Ubuntu 22.04+ install).
  • A screenshot comparison step no longer shows as passed when the reference image it created couldn't be saved, and the error names the image. A test run now waits until saving its images has succeeded or failed, and reference images that didn't change are no longer written back after every run.
  • LVGL v9.4 and v9.5: a bool property or subject passed to an on/off state or flag (e.g. checked="$checked") is no longer rejected as a type mismatch.
  • When a widget or component file is invalid, a file extending it says so, instead of incorrectly saying the element does not exist.
  • A missing subject, image, font or style is reported in every attribute of that type, e.g. bind_value, style_text_font, bg_image_src in a <style>, or a component's own type="image" property. Only a few attributes, such as subject and src, used to be checked.
    • NULL (for a subject, image or style) and the lv_font_default font are accepted.
  • The type of a #const, $prop or {prop} is also checked on a <view extends="…"> tag and on a multi-value property such as lv_slider's value.
  • A font, image, style or color declared under the same name in separate if_target blocks is no longer reported as ambiguous, as already for constants.
  • Reload Preview with new images when target is changed.
  • An image declared under the same name in an if_target block and in another <images> block is now handled and converted correctly.
  • The asset memory report finds the generated output of an image or bin font in an if_target block, and lists same-name assets from different if_target blocks separately. An empty target name in if_target (e.g. if_target="" or "a||b") no longer adds a stray _ to converted file names.
  • Subject values are kept when Preview is reloaded (except pointer subjects).
  • A value from a project <enumdef> (in globals.xml, an included library's globals.xml, or the component's own API) passed to a component's enum: property is no longer reported as invalid.
  • An invalid value error names the value given and lists the valid values of the enum, e.g. Attribute 'state' given invalid value 'busy'. Valid 'enum:ui_state' values are: normal, error.
  • LVGL v9.6.0: local subjects can be passed as properties, empty name attributes are reported, and the warning when using local subjects is gone (lv_xml update).
  • A component's type="subject" property can be passed as the subject of <subject_set_int_event>, <subject_set_float_event> and <subject_set_string_event>; a property that isn't a subject (e.g. an int) is reported there instead of accepted.
    • A subject passed to a subject:pointer attribute such as lv_image's bind_src must be a <pointer> subject or a type="subject" property.
  • A string checked for truthiness in a { } expression — !value, a &&/|| operand, a ternary condition, or a bool-typed property/subject's value with no operator at all — matched only whether the underlying C pointer was non-NULL, so e.g. hidden="{!subtitle}" stayed visible when subtitle was an empty string. It now matches the runtime's own non-empty check.
  • Preview hot reload on Windows compares changed file paths in one canonical form, so saving only the previewed file no longer restarts the Preview.
  • A saved change that breaks the project, such as a broken project.xml, now blocks the Preview instead of being missed.