aboutsummaryrefslogtreecommitdiff
path: root/src/ui/events/ui_event.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-11-07 20:20:26 +0800
committercrupest <crupest@outlook.com>2018-11-07 20:20:26 +0800
commite2efeb22595b263f6eac5563b163a2574aa2f0dc (patch)
treee371ab858ce124c0d2070096e41314e44af87ca2 /src/ui/events/ui_event.cpp
parent2b5b89e9483063f3af05fb5485043868d447994b (diff)
downloadcru-e2efeb22595b263f6eac5563b163a2574aa2f0dc.tar.gz
cru-e2efeb22595b263f6eac5563b163a2574aa2f0dc.tar.bz2
cru-e2efeb22595b263f6eac5563b163a2574aa2f0dc.zip
Reformat codes.
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();
}
}