Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Unified Diff: xfa/fwl/cfwl_pushbutton.cpp

Issue 2560873005: Cleanup CFWL_Widget code to return CFX_RectFs where appropriate (Closed)
Patch Set: Review feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/cfwl_picturebox.cpp ('k') | xfa/fwl/cfwl_scrollbar.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_pushbutton.cpp
diff --git a/xfa/fwl/cfwl_pushbutton.cpp b/xfa/fwl/cfwl_pushbutton.cpp
index 4e5ab8baf6c32cdb52950489bf485913d15a00ef..a1566bdad2373bbb0a3ee162bcb124db5b321005 100644
--- a/xfa/fwl/cfwl_pushbutton.cpp
+++ b/xfa/fwl/cfwl_pushbutton.cpp
@@ -50,7 +50,7 @@ void CFWL_PushButton::Update() {
m_pProperties->m_pThemeProvider = GetAvailableTheme();
UpdateTextOutStyles();
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
m_rtCaption = m_rtClient;
FX_FLOAT* fcaption =
static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin));
@@ -208,7 +208,7 @@ void CFWL_PushButton::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
else
m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Focused;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_PushButton::OnLButtonDown(CFWL_MessageMouse* pMsg) {
@@ -218,7 +218,7 @@ void CFWL_PushButton::OnLButtonDown(CFWL_MessageMouse* pMsg) {
m_bBtnDown = true;
m_pProperties->m_dwStates |= FWL_STATE_PSB_Hovered;
m_pProperties->m_dwStates |= FWL_STATE_PSB_Pressed;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_PushButton::OnLButtonUp(CFWL_MessageMouse* pMsg) {
@@ -234,7 +234,7 @@ void CFWL_PushButton::OnLButtonUp(CFWL_MessageMouse* pMsg) {
CFWL_Event wmClick(CFWL_Event::Type::Click, this);
DispatchEvent(&wmClick);
}
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_PushButton::OnMouseMove(CFWL_MessageMouse* pMsg) {
@@ -268,14 +268,14 @@ void CFWL_PushButton::OnMouseMove(CFWL_MessageMouse* pMsg) {
}
}
if (bRepaint)
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_PushButton::OnMouseLeave(CFWL_MessageMouse* pMsg) {
m_bBtnDown = false;
m_pProperties->m_dwStates &= ~FWL_STATE_PSB_Hovered;
m_pProperties->m_dwStates &= ~FWL_STATE_PSB_Pressed;
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
void CFWL_PushButton::OnKeyDown(CFWL_MessageKey* pMsg) {
« no previous file with comments | « xfa/fwl/cfwl_picturebox.cpp ('k') | xfa/fwl/cfwl_scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698