mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Add a clock widget.
This commit is contained in:
parent
6637dec958
commit
73895ce043
12 changed files with 143 additions and 15 deletions
|
@ -2,6 +2,7 @@
|
|||
#include "Event.h"
|
||||
#include "EventLoop.h"
|
||||
#include "WindowManager.h"
|
||||
#include "Window.h"
|
||||
#include <AK/Assertions.h>
|
||||
|
||||
Widget::Widget(Widget* parent)
|
||||
|
@ -26,6 +27,10 @@ void Widget::event(Event& event)
|
|||
{
|
||||
switch (event.type()) {
|
||||
case Event::Paint:
|
||||
if (auto* win = window()) {
|
||||
if (win->isBeingDragged())
|
||||
return;
|
||||
}
|
||||
m_hasPendingPaintEvent = false;
|
||||
return onPaint(static_cast<PaintEvent&>(event));
|
||||
case Event::Show:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue