Skip to content

lv_qrcode colors ignored when data attribute is declared before light_color/dark_color in XML #351

Description

@julian-0

When using <lv_qrcode> in LVGL Pro XML, the light_color and dark_color attributes are silently ignored if they appear after the data attribute in the XML. The QR code always renders in default black & white.

<lv_qrcode data="https://google.com/" light_color="0xff0000" dark_color="0x00ff05" />

Result:

Image
<lv_qrcode light_color="0xff0000" dark_color="0x00ff05" data="https://google.com/" />

Result:

Image

I think the cause is that the code generator emits calls in XML attribute declaration order. Since lv_qrcode_set_data() internally calls lv_qrcode_update() (which renders immediately), any lv_qrcode_set_light_color() / lv_qrcode_set_dark_color() calls that follow have no visible effect.

Lvgl Editor version 1.1.1
LVGL version: 9.5.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions