[lvgl] Bugfixes (#7803)

This commit is contained in:
Clyde Stubbs 2024-11-25 07:25:16 +11:00 committed by Jesse Hills
parent ee3cfb2b76
commit 4a97064b2c
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
4 changed files with 8 additions and 3 deletions

View File

@ -322,8 +322,8 @@ async def to_code(configs):
await encoders_to_code(lv_component, config, default_group)
await keypads_to_code(lv_component, config, default_group)
await theme_to_code(config)
await styles_to_code(config)
await gradients_to_code(config)
await styles_to_code(config)
await set_obj_properties(lv_scr_act, config)
await add_widgets(lv_scr_act, config)
await add_pages(lv_component, config)

View File

@ -30,7 +30,7 @@ from .defines import (
call_lambda,
literal,
)
from .helpers import esphome_fonts_used, lv_fonts_used, requires_component
from .helpers import add_lv_use, esphome_fonts_used, lv_fonts_used, requires_component
from .types import lv_font_t, lv_gradient_t, lv_img_t
opacity_consts = LvConstant("LV_OPA_", "TRANSP", "COVER")
@ -326,6 +326,7 @@ def image_validator(value):
value = requires_component("image")(value)
value = cv.use_id(Image_)(value)
lv_images_used.add(value)
add_lv_use("img", "label")
return value

View File

@ -341,6 +341,7 @@ FLEX_OBJ_SCHEMA = {
cv.Optional(df.CONF_FLEX_GROW): cv.int_,
}
DISP_BG_SCHEMA = cv.Schema(
{
cv.Optional(df.CONF_DISP_BG_IMAGE): lv_image,

View File

@ -39,7 +39,10 @@ LINE_SCHEMA = {
class LineType(WidgetType):
def __init__(self):
super().__init__(
CONF_LINE, LvType("lv_line_t"), (CONF_MAIN,), LINE_SCHEMA, modify_schema={}
CONF_LINE,
LvType("lv_line_t"),
(CONF_MAIN,),
LINE_SCHEMA,
)
async def to_code(self, w: Widget, config):