diff --git a/radio/src/thirdparty/libopenui/src/button.h b/radio/src/thirdparty/libopenui/src/button.h index 5c9602ea3..78ce23de7 100644 --- a/radio/src/thirdparty/libopenui/src/button.h +++ b/radio/src/thirdparty/libopenui/src/button.h @@ -87,8 +87,8 @@ class Button: public FormField class TextButton: public Button { public: - TextButton(FormGroup * parent, const rect_t & rect, std::string text, std::function pressHandler = nullptr, WindowFlags windowFlags = BUTTON_BACKGROUND, LcdFlags textFlags = 0): - Button(parent, rect, std::move(pressHandler), windowFlags | OPAQUE, textFlags), + TextButton(FormGroup * parent, const rect_t & rect, std::string text, std::function pressHandler = nullptr, WindowFlags windowFlags = BUTTON_BACKGROUND | OPAQUE, LcdFlags textFlags = 0): + Button(parent, rect, std::move(pressHandler), windowFlags, textFlags), text(std::move(text)) { } diff --git a/radio/src/thirdparty/libopenui/src/keyboard_number.cpp b/radio/src/thirdparty/libopenui/src/keyboard_number.cpp index df578ebe1..a8891e048 100644 --- a/radio/src/thirdparty/libopenui/src/keyboard_number.cpp +++ b/radio/src/thirdparty/libopenui/src/keyboard_number.cpp @@ -32,43 +32,43 @@ NumberKeyboard::NumberKeyboard() : [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_BACKWARD); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); new TextButton(this, {LCD_W / 2 - 55, 10, 50, 30}, "-", [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_MINUS); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); new TextButton(this, {LCD_W / 2 + 5, 10, 50, 30}, "+", [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_PLUS); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); new TextButton(this, {LCD_W / 2 + 65, 10, 50, 30}, ">>", [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_FORWARD); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); new TextButton(this, {LCD_W / 2 - 115, 50, 50, 30}, "MIN", [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_MIN); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); new TextButton(this, {LCD_W / 2 + 65, 50, 50, 30}, "MAX", [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_MAX); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); new TextButton(this, {LCD_W / 2 - 55, 50, 110, 30}, "DEFAULT", [=]() -> uint8_t { putEvent(EVT_VIRTUAL_KEY_DEFAULT); return 0; - }, BUTTON_BACKGROUND | NO_FOCUS); + }, BUTTON_BACKGROUND | OPAQUE | NO_FOCUS); } NumberKeyboard::~NumberKeyboard() diff --git a/radio/src/thirdparty/libopenui/src/theme.h b/radio/src/thirdparty/libopenui/src/theme.h index 5b5a36fc4..fc9c8759f 100644 --- a/radio/src/thirdparty/libopenui/src/theme.h +++ b/radio/src/thirdparty/libopenui/src/theme.h @@ -51,7 +51,7 @@ class Theme { virtual const BitmapBuffer * getIcon(uint8_t index, IconState state) const = 0; virtual const BitmapBuffer * getIconMask(uint8_t index) const = 0; - virtual TextButton * createTextButton(FormGroup * parent, const rect_t & rect, std::string text, std::function pressHandler = nullptr, WindowFlags windowFlags = BUTTON_BACKGROUND) const + virtual TextButton * createTextButton(FormGroup * parent, const rect_t & rect, std::string text, std::function pressHandler = nullptr, WindowFlags windowFlags = OPAQUE | BUTTON_BACKGROUND) const { return new TextButton(parent, rect, text, pressHandler, windowFlags); }