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:
parent
e9e7f7a714
commit
3ebea05996
9 changed files with 89 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue