mirror of
https://github.com/esphome/esphome.git
synced 2024-12-03 13:34:01 +01:00
[lvgl] Bugfixes (#7803)
This commit is contained in:
parent
ee3cfb2b76
commit
4a97064b2c
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user