1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 00:08:11 +00:00

Add a simple MsgBox() :^)

This commit is contained in:
Andreas Kling 2018-10-14 00:21:42 +02:00
parent e9e7f7a714
commit 3ebea05996
9 changed files with 89 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include "EventLoop.h"
#include "WindowManager.h"
#include "Window.h"
#include "Painter.h"
#include <AK/Assertions.h>
Widget::Widget(Widget* parent)
@ -64,6 +65,10 @@ void Widget::event(Event& event)
void Widget::paintEvent(PaintEvent& event)
{
//printf("Widget::paintEvent :)\n");
if (fillWithBackgroundColor()) {
Painter painter(*this);
painter.fillRect(rect(), backgroundColor());
}
for (auto* ch : children()) {
auto* child = (Widget*)ch;
child->paintEvent(event);