Merge pull request #272 from eshifri/2.4

Fix for #256
This commit is contained in:
Raphael Coeffic
2021-06-20 17:29:50 +02:00
committed by GitHub
@@ -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("Layout2x4", "2 x 4", LBM_LAYOUT_2x4, OPTIONS_LAYOUT_2x4);