libui: Actually fill window backgrounds with the correct color

This commit is contained in:
apio 2023-08-15 12:30:53 +02:00
parent d0c4264608
commit d78d76ad16
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,7 @@ Result<int> luna_main(int argc, char** argv)
ColorWidget blue(ui::BLUE);
layout.add_widget(blue);
ui::HorizontalLayout sublayout;
ui::HorizontalLayout sublayout(ui::AdjustHeight::No, ui::AdjustWidth::Yes);
layout.add_widget(sublayout);
ColorWidget red(ui::RED);

View File

@ -94,6 +94,7 @@ namespace ui
Result<void> Window::draw()
{
m_canvas.fill(m_background);
if (m_main_widget) return m_main_widget->draw(m_canvas);
update();
return {};