diff --git a/radio/src/thirdparty/libopenui/src/form.h b/radio/src/thirdparty/libopenui/src/form.h index 88c2ff56f..f04483c46 100644 --- a/radio/src/thirdparty/libopenui/src/form.h +++ b/radio/src/thirdparty/libopenui/src/form.h @@ -44,6 +44,11 @@ class FormField: public Window changeHandler = std::move(handler); } + void setBackgroundHandler(std::function handler) + { + backgroundHandler = std::move(handler); + } + inline void setNextField(FormField *field) { next = field; @@ -117,6 +122,7 @@ class FormField: public Window bool editMode = false; bool enabled = true; std::function changeHandler = nullptr; + std::function backgroundHandler = nullptr; }; class FormGroup: public FormField diff --git a/radio/src/thirdparty/libopenui/src/gridlayout.h b/radio/src/thirdparty/libopenui/src/gridlayout.h index a606f5796..60e6024bc 100644 --- a/radio/src/thirdparty/libopenui/src/gridlayout.h +++ b/radio/src/thirdparty/libopenui/src/gridlayout.h @@ -23,8 +23,9 @@ class GridLayout { public: - explicit GridLayout(coord_t width): - width(width) + explicit GridLayout(coord_t width, coord_t top = 0): + width(width), + currentY(top) { } @@ -68,8 +69,8 @@ class GridLayout { class FormGridLayout: public GridLayout { public: - explicit FormGridLayout(coord_t width = LCD_W): - GridLayout(width) + explicit FormGridLayout(coord_t width = LCD_W, coord_t top = 0): + GridLayout(width, top) { } diff --git a/radio/src/thirdparty/libopenui/src/modal_window.cpp b/radio/src/thirdparty/libopenui/src/modal_window.cpp index 8fba5c93f..b33983164 100644 --- a/radio/src/thirdparty/libopenui/src/modal_window.cpp +++ b/radio/src/thirdparty/libopenui/src/modal_window.cpp @@ -41,12 +41,12 @@ void ModalWindow::deleteLater(bool detach, bool trash) void ModalWindow::paint(BitmapBuffer * dc) { - dc->drawFilledRect(0, 0, width(), height(), SOLID, COLOR_THEME_SECONDARY3, OPACITY(5)); + dc->drawFilledRect(0, 0, width(), height(), SOLID, BLACK, OPACITY(6)); } void ModalWindowContent::paint(BitmapBuffer * dc) { - dc->drawSolidFilledRect(0, 0, width(), POPUP_HEADER_HEIGHT, COLOR_THEME_FOCUS); + dc->drawSolidFilledRect(0, 0, width(), POPUP_HEADER_HEIGHT, COLOR_THEME_SECONDARY1); dc->drawText(FIELD_PADDING_LEFT, (POPUP_HEADER_HEIGHT - getFontHeight(FONT(STD))) / 2, title.c_str(), COLOR_THEME_PRIMARY2); dc->drawSolidFilledRect(0, POPUP_HEADER_HEIGHT, width(), height() - POPUP_HEADER_HEIGHT, COLOR_THEME_SECONDARY3); }