Skip to content

Commit

Permalink
#450 "get_style_..." functions added to styles.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Aug 31, 2024
1 parent 671a957 commit 7a4cf8a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/project-editor/lvgl/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,24 @@ extern const ext_img_desc_t images[${this.bitmaps.length || 1}];
const build = this;

for (const lvglStyle of this.styles) {
build.line("// Style: " + lvglStyle.name);

const definition = lvglStyle.fullDefinition;
if (definition) {
Object.keys(definition).forEach(part => {
Object.keys(definition[part]).forEach(state => {
// build style get function
build.line(
`lv_style_t *${this.getGetStyleFunctionName(
lvglStyle,
part,
state
)}();`
);
});
});
}

build.line(
`void ${this.getAddStyleFunctionName(
lvglStyle
Expand All @@ -798,6 +816,7 @@ extern const ext_img_desc_t images[${this.bitmaps.length || 1}];
lvglStyle
)}(lv_obj_t *obj);`
);

build.line("");
}

Expand Down

0 comments on commit 7a4cf8a

Please sign in to comment.