diff --git a/radio/src/gui/colorlcd/layouts/layout2x4.cpp b/radio/src/gui/colorlcd/layouts/layout2x4.cpp index b88c97095..66bc3c186 100644 --- a/radio/src/gui/colorlcd/layouts/layout2x4.cpp +++ b/radio/src/gui/colorlcd/layouts/layout2x4.cpp @@ -79,6 +79,25 @@ class Layout2x4: public Layout return zone; } + + void paint(BitmapBuffer * dc) override; }; +void Layout2x4::paint(BitmapBuffer* dc) +{ + Layout::paint(dc); + rect_t fullScreen = Layout::getMainZone(); + fullScreen.w /= 2; + if (getOptionValue(OPTION_PANEL1_BACKGROUND)->boolValue) { + dc->drawSolidFilledRect(fullScreen.x, fullScreen.y, fullScreen.w, + fullScreen.h, COLOR2FLAGS(getOptionValue(OPTION_PANEL1_COLOR)->unsignedValue)); + } + + if (getOptionValue(OPTION_PANEL2_BACKGROUND)->boolValue) { + fullScreen.x += fullScreen.w; + dc->drawSolidFilledRect(fullScreen.x, fullScreen.y, fullScreen.w, + fullScreen.h, COLOR2FLAGS(getOptionValue(OPTION_PANEL2_COLOR)->unsignedValue)); + } +} + BaseLayoutFactory layout2x4("Layout2x4", "2 x 4", LBM_LAYOUT_2x4, OPTIONS_LAYOUT_2x4);