aboutsummaryrefslogtreecommitdiff
path: root/src/ui/events/ui_event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/events/ui_event.cpp')
-rw-r--r--src/ui/events/ui_event.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/ui/events/ui_event.cpp b/src/ui/events/ui_event.cpp
index 5e9ca452..9f5185ce 100644
--- a/src/ui/events/ui_event.cpp
+++ b/src/ui/events/ui_event.cpp
@@ -2,18 +2,12 @@
#include "ui/control.h"
-namespace cru
+namespace cru::ui::events
{
- namespace ui
+ Point MouseEventArgs::GetPoint(Control* control, const RectRange range) const
{
- namespace events
- {
- Point MouseEventArgs::GetPoint(Control* control, const RectRange range) const
- {
- if (point_.has_value())
- return control->TransformPoint(control->WindowToControl(point_.value()), RectRange::Margin, range);
- return Point();
- }
- }
+ if (point_.has_value())
+ return control->TransformPoint(control->WindowToControl(point_.value()), RectRange::Margin, range);
+ return Point();
}
}