Add theme switch to all LCD boards

This commit is contained in:
Terrence
2025-03-20 03:00:07 +08:00
parent 71799ed85c
commit 6bb1ab7583
36 changed files with 73 additions and 119 deletions

View File

@@ -25,8 +25,8 @@ public:
virtual void SetEmotion(const char* emotion);
virtual void SetChatMessage(const char* role, const char* content);
virtual void SetIcon(const char* icon);
virtual void SetTheme(const std::string& theme_name){}
virtual std::string GetTheme() { return "light"; }
virtual void SetTheme(const std::string& theme_name);
virtual std::string GetTheme() { return current_theme_name_; }
inline int width() const { return width_; }
inline int height() const { return height_; }
@@ -50,6 +50,7 @@ protected:
const char* battery_icon_ = nullptr;
const char* network_icon_ = nullptr;
bool muted_ = false;
std::string current_theme_name_;
esp_timer_handle_t notification_timer_ = nullptr;
esp_timer_handle_t update_timer_ = nullptr;