Skip to content

Commit

Permalink
Fixed: [LVGL] False error "Invalid color" reported in Led widget when…
Browse files Browse the repository at this point in the history
… expression is used for the "Color" #641
  • Loading branch information
mvladic committed Nov 19, 2024
1 parent 0574bb6 commit 16bb20c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Envox <[email protected]>",
"description": "Cross-platform visual development tool and SCPI instrument controller",
"homepage": "https://www.envox.hr/eez/studio/studio-introduction.html",
"version": "0.20.0",
"version": "0.21.0",
"revision": "1",
"license": "GPL-3.0-only",
"repository": "https://github.com/eez-open/studio",
Expand Down
28 changes: 15 additions & 13 deletions packages/project-editor/lvgl/widgets/Led.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,21 @@ export class LVGLLedWidget extends LVGLWidget {
},

check(object: LVGLLedWidget, messages) {
const colorValue = getThemedColor(
ProjectEditor.getProjectStore(object),
object.color
).colorValue;

if (!isValid(colorValue)) {
messages.push(
new Message(
MessageType.ERROR,
`invalid color`,
getChildOfObject(object, "color")
)
);
if (object.colorType == "literal") {
const colorValue = getThemedColor(
ProjectEditor.getProjectStore(object),
object.color
).colorValue;

if (!isValid(colorValue)) {
messages.push(
new Message(
MessageType.ERROR,
`invalid color`,
getChildOfObject(object, "color")
)
);
}
}
},

Expand Down

0 comments on commit 16bb20c

Please sign in to comment.