summaryrefslogtreecommitdiff
path: root/Widgets/Widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Widgets/Widget.cpp')
-rw-r--r--Widgets/Widget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Widgets/Widget.cpp b/Widgets/Widget.cpp
index 8332abd92d..f5a66e79f1 100644
--- a/Widgets/Widget.cpp
+++ b/Widgets/Widget.cpp
@@ -16,10 +16,10 @@ Widget::~Widget()
{
}
-void Widget::setRect(const Rect& rect)
+void Widget::setWindowRelativeRect(const Rect& rect)
{
// FIXME: Make some kind of event loop driven ResizeEvent?
- m_rect = rect;
+ m_relativeRect = rect;
update();
}
@@ -102,8 +102,8 @@ Widget::HitTestResult Widget::hitTest(int x, int y)
// FIXME: Care about z-order.
for (auto* ch : children()) {
auto* child = (Widget*)ch;
- if (child->rect().contains(x, y)) {
- return child->hitTest(x - child->rect().x(), y - child->rect().y());
+ if (child->relativeRect().contains(x, y)) {
+ return child->hitTest(x - child->relativeRect().x(), y - child->relativeRect().y());
}
}
return { this, x, y };