mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
32 lines
671 B
C++
32 lines
671 B
C++
#include "RootWidget.h"
|
|
#include "Painter.h"
|
|
#include "WindowManager.h"
|
|
#include <cstdio>
|
|
|
|
RootWidget::RootWidget()
|
|
{
|
|
}
|
|
|
|
RootWidget::~RootWidget()
|
|
{
|
|
}
|
|
|
|
void RootWidget::paintEvent(PaintEvent& event)
|
|
{
|
|
Widget::paintEvent(event);
|
|
|
|
printf("RootWidget::paintEvent: %d,%d %dx%d\n",
|
|
event.rect().x(),
|
|
event.rect().y(),
|
|
event.rect().width(),
|
|
event.rect().height());
|
|
Painter painter(*this);
|
|
painter.fillRect(event.rect(), Color(0, 72, 96));
|
|
}
|
|
|
|
void RootWidget::mouseMoveEvent(MouseEvent& event)
|
|
{
|
|
//printf("RootWidget::mouseMoveEvent: x=%d, y=%d\n", event.x(), event.y());
|
|
Widget::mouseMoveEvent(event);
|
|
}
|
|
|