aboutsummaryrefslogtreecommitdiff
path: root/src/ui/events/ui_event.cpp
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2018-11-07 21:17:30 +0800
committerGitHub <noreply@github.com>2018-11-07 21:17:30 +0800
commit634dab6ad2c9e4675beacfb77ac02b2d43cab132 (patch)
treeb44d8cd6f8f4ffbbb6451d42ba9a6b4d98828aec /src/ui/events/ui_event.cpp
parentdf0d6e1e282c75d4d8154011715f0b74547b35db (diff)
parent6f76a0ad3df99ea0d99623347d019536cc07e920 (diff)
downloadcru-634dab6ad2c9e4675beacfb77ac02b2d43cab132.tar.gz
cru-634dab6ad2c9e4675beacfb77ac02b2d43cab132.tar.bz2
cru-634dab6ad2c9e4675beacfb77ac02b2d43cab132.zip
Merge pull request #1 from crupest/minmax-layout
Min max layout support.
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();
}
}