summaryrefslogtreecommitdiff
path: root/Widgets/Rect.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-12 02:24:05 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-12 02:24:05 +0200
commit64127e06378259515006f876440ce0ecd5fa7728 (patch)
treec444dfea758d8572a418165e70651abc620cac26 /Widgets/Rect.h
parent22721e6729633f507a3df6c98ab440b536b1b24a (diff)
downloadserenity-64127e06378259515006f876440ce0ecd5fa7728.zip
Very hacky support for dragging a window around.
Diffstat (limited to 'Widgets/Rect.h')
-rw-r--r--Widgets/Rect.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Widgets/Rect.h b/Widgets/Rect.h
index 339db76cd4..93d960434a 100644
--- a/Widgets/Rect.h
+++ b/Widgets/Rect.h
@@ -12,6 +12,11 @@ public:
{
}
+ bool isEmpty() const
+ {
+ return width() == 0 || height() == 0;
+ }
+
void moveBy(int dx, int dy)
{
m_location.moveBy(dx, dy);