summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_spinbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/cfwl_spinbutton.cpp')
-rw-r--r--xfa/fwl/cfwl_spinbutton.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/xfa/fwl/cfwl_spinbutton.cpp b/xfa/fwl/cfwl_spinbutton.cpp
index 140cdd50be..6e58b69baf 100644
--- a/xfa/fwl/cfwl_spinbutton.cpp
+++ b/xfa/fwl/cfwl_spinbutton.cpp
@@ -66,14 +66,14 @@ void CFWL_SpinButton::Update() {
}
}
-FWL_WidgetHit CFWL_SpinButton::HitTest(FX_FLOAT fx, FX_FLOAT fy) {
- if (m_rtClient.Contains(fx, fy))
+FWL_WidgetHit CFWL_SpinButton::HitTest(const CFX_PointF& point) {
+ if (m_rtClient.Contains(point))
return FWL_WidgetHit::Client;
- if (HasBorder() && (m_rtClient.Contains(fx, fy)))
+ if (HasBorder() && (m_rtClient.Contains(point)))
return FWL_WidgetHit::Border;
- if (m_rtUpButton.Contains(fx, fy))
+ if (m_rtUpButton.Contains(point))
return FWL_WidgetHit::UpButton;
- if (m_rtDnButton.Contains(fx, fy))
+ if (m_rtDnButton.Contains(point))
return FWL_WidgetHit::DownButton;
return FWL_WidgetHit::Unknown;
}
@@ -201,10 +201,8 @@ void CFWL_SpinButton::OnLButtonDown(CFWL_MessageMouse* pMsg) {
SetGrab(true);
SetFocus(true);
- bool bUpPress =
- (m_rtUpButton.Contains(pMsg->m_fx, pMsg->m_fy) && IsUpButtonEnabled());
- bool bDnPress =
- (m_rtDnButton.Contains(pMsg->m_fx, pMsg->m_fy) && IsDownButtonEnabled());
+ bool bUpPress = m_rtUpButton.Contains(pMsg->m_pos) && IsUpButtonEnabled();
+ bool bDnPress = m_rtDnButton.Contains(pMsg->m_pos) && IsDownButtonEnabled();
if (!bUpPress && !bDnPress)
return;
if (bUpPress) {
@@ -255,7 +253,7 @@ void CFWL_SpinButton::OnMouseMove(CFWL_MessageMouse* pMsg) {
bool bRepaint = false;
CFX_RectF rtInvlidate;
- if (m_rtUpButton.Contains(pMsg->m_fx, pMsg->m_fy)) {
+ if (m_rtUpButton.Contains(pMsg->m_pos)) {
if (IsUpButtonEnabled()) {
if (m_dwUpState == CFWL_PartState_Hovered) {
m_dwUpState = CFWL_PartState_Hovered;
@@ -275,7 +273,7 @@ void CFWL_SpinButton::OnMouseMove(CFWL_MessageMouse* pMsg) {
if (!IsDownButtonEnabled())
DisableButton();
- } else if (m_rtDnButton.Contains(pMsg->m_fx, pMsg->m_fy)) {
+ } else if (m_rtDnButton.Contains(pMsg->m_pos)) {
if (IsDownButtonEnabled()) {
if (m_dwDnState != CFWL_PartState_Hovered) {
m_dwDnState = CFWL_PartState_Hovered;