fix upgrade icon

This commit is contained in:
Terrence
2025-01-25 12:44:31 +08:00
parent e4d80060a2
commit 046ca3e0c9
3 changed files with 12 additions and 2 deletions

View File

@@ -377,3 +377,11 @@ void LcdDisplay::SetEmotion(const std::string &emotion) {
}
}
void LcdDisplay::SetIcon(const char* icon) {
if (emotion_label_ == nullptr) {
return;
}
DisplayLockGuard lock(this);
lv_obj_set_style_text_font(emotion_label_, &font_awesome_30_4, 0);
lv_label_set_text(emotion_label_, icon);
}

View File

@@ -50,6 +50,7 @@ public:
void SetChatMessage(const std::string &role, const std::string &content) override;
void SetEmotion(const std::string &emotion) override;
void SetIcon(const char* icon) override;
};
#endif // LCD_DISPLAY_H