feat: Add lvgl display theme control (#1180)

* feat: Add lvgl display theme control

* fix: compiling errors

* move light/dark themes to lcd display

* fix compile errors

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
This commit is contained in:
Xiaoxia
2025-09-10 18:43:47 +08:00
committed by GitHub
parent bce662d135
commit 4048647ef8
29 changed files with 882 additions and 617 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include <lvgl.h>
// Wrap around lv_img_dsc_t
class LvglImage {
public:
virtual const lv_img_dsc_t* image_dsc() const = 0;
virtual ~LvglImage() = default;
};
class LvglRawImage : public LvglImage {
public:
LvglRawImage(void* data, size_t size);
virtual const lv_img_dsc_t* image_dsc() const override { return &image_dsc_; }
private:
lv_img_dsc_t image_dsc_;
};
class LvglCBinImage : public LvglImage {
public:
LvglCBinImage(void* data);
virtual ~LvglCBinImage();
virtual const lv_img_dsc_t* image_dsc() const override { return image_dsc_; }
private:
lv_img_dsc_t* image_dsc_ = nullptr;
};