fix(color): Buttons on model setup page not showing active state (#3942)
This commit is contained in:
@@ -96,13 +96,6 @@ class SubScreenButton : public TextButton
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SubScreenButton(Window* parent, const char* text,
|
SubScreenButton(Window* parent, const char* text,
|
||||||
std::function<void(void)> pressHandler);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual bool isActive() { return false; }
|
|
||||||
};
|
|
||||||
|
|
||||||
SubScreenButton::SubScreenButton(Window* parent, const char* text,
|
|
||||||
std::function<void(void)> pressHandler) :
|
std::function<void(void)> pressHandler) :
|
||||||
TextButton(parent, rect_t{}, text, [=]() -> uint8_t {
|
TextButton(parent, rect_t{}, text, [=]() -> uint8_t {
|
||||||
pressHandler();
|
pressHandler();
|
||||||
@@ -118,6 +111,15 @@ SubScreenButton::SubScreenButton(Window* parent, const char* text,
|
|||||||
lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0);
|
lv_obj_set_style_text_align(label, LV_TEXT_ALIGN_CENTER, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void checkEvents() override
|
||||||
|
{
|
||||||
|
check(isActive());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool isActive() { return false; }
|
||||||
|
};
|
||||||
|
|
||||||
struct IntmoduleButton : public SubScreenButton {
|
struct IntmoduleButton : public SubScreenButton {
|
||||||
IntmoduleButton(Window* parent) :
|
IntmoduleButton(Window* parent) :
|
||||||
SubScreenButton(parent, STR_INTERNALRF,
|
SubScreenButton(parent, STR_INTERNALRF,
|
||||||
|
|||||||
Reference in New Issue
Block a user