SLS export code compiles without checking LV dependencies

What do you want to achieve?

I’d like SquareLine studio’s code to not compile if it’s not going to run correctly.

What have you tried so far?

Typically, when we use a feature in SquareLine that’s disabled in LVGL, we struggle through it, uncertain of what is failing, eventually stepping through LVGL line by line until we identify the cause. It’s not super effective.

Demo

Use Widget-Transform to rotate a widget 180.0 degrees. Export it to a device without LV_COLOR_SCREEN_TRANSP, and it will render the wrong direction(not flipped).

Suggestion: when using Widget-Transform, add this to the export:

static_assert(LV_COLOR_SCREEN_TRANSP, "Widget-Transform relies on LV_COLOR_SCREEN_TRANSP");

This way, we can convert a run-time issue into a build-time issue, with a meaningful error message.

Others

  • SquareLine Studio version: 1.5.0
  • Operating system: Windows 11
  • Target hardware: ESP32-S3 bespoke device