feat: Add gif support (#1183)

* feat: Add gif support

* fix: compiling errors

* fix remove bg image
This commit is contained in:
Xiaoxia
2025-09-11 03:53:12 +08:00
committed by GitHub
parent 4048647ef8
commit 57c2c64047
34 changed files with 1690 additions and 327 deletions

View File

@@ -2,6 +2,7 @@
#define LCD_DISPLAY_H
#include "lvgl_display.h"
#include "gif/lvgl_gif.h"
#include <esp_lcd_panel_io.h>
#include <esp_lcd_panel_ops.h>
@@ -24,8 +25,11 @@ protected:
lv_obj_t* container_ = nullptr;
lv_obj_t* side_bar_ = nullptr;
lv_obj_t* preview_image_ = nullptr;
lv_obj_t* emoji_label_ = nullptr;
lv_obj_t* emoji_image_ = nullptr;
std::unique_ptr<LvglGif> gif_controller_ = nullptr;
lv_obj_t* emoji_box_ = nullptr;
lv_obj_t* chat_message_label_ = nullptr;
esp_timer_handle_t preview_timer_ = nullptr;
void InitializeLcdThemes();
@@ -41,9 +45,7 @@ public:
~LcdDisplay();
virtual void SetEmotion(const char* emotion) override;
virtual void SetPreviewImage(const lv_img_dsc_t* img_dsc) override;
#if CONFIG_USE_WECHAT_MESSAGE_STYLE
virtual void SetChatMessage(const char* role, const char* content) override;
#endif
// Add theme switching function
virtual void SetTheme(Theme* theme) override;