mirror of
https://github.com/esphome/esphome.git
synced 2024-11-30 10:44:13 +01:00
[lvgl] Bugfixes (#7803)
This commit is contained in:
parent
2ecd5cff07
commit
4936ca1700
4 changed files with 8 additions and 3 deletions
|
@ -322,8 +322,8 @@ async def to_code(configs):
|
||||||
await encoders_to_code(lv_component, config, default_group)
|
await encoders_to_code(lv_component, config, default_group)
|
||||||
await keypads_to_code(lv_component, config, default_group)
|
await keypads_to_code(lv_component, config, default_group)
|
||||||
await theme_to_code(config)
|
await theme_to_code(config)
|
||||||
await styles_to_code(config)
|
|
||||||
await gradients_to_code(config)
|
await gradients_to_code(config)
|
||||||
|
await styles_to_code(config)
|
||||||
await set_obj_properties(lv_scr_act, config)
|
await set_obj_properties(lv_scr_act, config)
|
||||||
await add_widgets(lv_scr_act, config)
|
await add_widgets(lv_scr_act, config)
|
||||||
await add_pages(lv_component, config)
|
await add_pages(lv_component, config)
|
||||||
|
|
|
@ -30,7 +30,7 @@ from .defines import (
|
||||||
call_lambda,
|
call_lambda,
|
||||||
literal,
|
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
|
from .types import lv_font_t, lv_gradient_t, lv_img_t
|
||||||
|
|
||||||
opacity_consts = LvConstant("LV_OPA_", "TRANSP", "COVER")
|
opacity_consts = LvConstant("LV_OPA_", "TRANSP", "COVER")
|
||||||
|
@ -326,6 +326,7 @@ def image_validator(value):
|
||||||
value = requires_component("image")(value)
|
value = requires_component("image")(value)
|
||||||
value = cv.use_id(Image_)(value)
|
value = cv.use_id(Image_)(value)
|
||||||
lv_images_used.add(value)
|
lv_images_used.add(value)
|
||||||
|
add_lv_use("img", "label")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -341,6 +341,7 @@ FLEX_OBJ_SCHEMA = {
|
||||||
cv.Optional(df.CONF_FLEX_GROW): cv.int_,
|
cv.Optional(df.CONF_FLEX_GROW): cv.int_,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DISP_BG_SCHEMA = cv.Schema(
|
DISP_BG_SCHEMA = cv.Schema(
|
||||||
{
|
{
|
||||||
cv.Optional(df.CONF_DISP_BG_IMAGE): lv_image,
|
cv.Optional(df.CONF_DISP_BG_IMAGE): lv_image,
|
||||||
|
|
|
@ -39,7 +39,10 @@ LINE_SCHEMA = {
|
||||||
class LineType(WidgetType):
|
class LineType(WidgetType):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
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):
|
async def to_code(self, w: Widget, config):
|
||||||
|
|
Loading…
Reference in a new issue