mirror of
https://github.com/esphome/esphome.git
synced 2026-05-31 17:06:40 +08:00
[lvgl] Guard lv_image_set_src wrapper with LV_USE_IMAGE (#15789)
This commit is contained in:
@@ -76,16 +76,17 @@ inline void lv_style_set_text_font(lv_style_t *style, const font::Font *font) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_LVGL_IMAGE) && defined(USE_IMAGE)
|
#if defined(USE_LVGL_IMAGE) && defined(USE_IMAGE)
|
||||||
// Shortcut / overload, so that the source of an image can easily be updated
|
#if LV_USE_IMAGE
|
||||||
// from within a lambda.
|
// Shortcut / overload, so that the source of an image widget can easily be updated from within a lambda.
|
||||||
inline void lv_image_set_src(lv_obj_t *obj, image::Image *image) { lv_image_set_src(obj, image->get_lv_image_dsc()); }
|
inline void lv_image_set_src(lv_obj_t *obj, image::Image *image) { ::lv_image_set_src(obj, image->get_lv_image_dsc()); }
|
||||||
|
#endif // LV_USE_IMAGE
|
||||||
|
|
||||||
inline void lv_obj_set_style_bitmap_mask_src(lv_obj_t *obj, image::Image *image, lv_style_selector_t selector) {
|
inline void lv_obj_set_style_bitmap_mask_src(lv_obj_t *obj, image::Image *image, lv_style_selector_t selector) {
|
||||||
lv_obj_set_style_bitmap_mask_src(obj, image->get_lv_image_dsc(), selector);
|
::lv_obj_set_style_bitmap_mask_src(obj, image->get_lv_image_dsc(), selector);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void lv_obj_set_style_bg_image_src(lv_obj_t *obj, image::Image *image, lv_style_selector_t selector) {
|
inline void lv_obj_set_style_bg_image_src(lv_obj_t *obj, image::Image *image, lv_style_selector_t selector) {
|
||||||
lv_obj_set_style_bg_image_src(obj, image->get_lv_image_dsc(), selector);
|
::lv_obj_set_style_bg_image_src(obj, image->get_lv_image_dsc(), selector);
|
||||||
}
|
}
|
||||||
#endif // USE_LVGL_IMAGE
|
#endif // USE_LVGL_IMAGE
|
||||||
#ifdef USE_LVGL_ANIMIMG
|
#ifdef USE_LVGL_ANIMIMG
|
||||||
|
|||||||
Reference in New Issue
Block a user