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

Unified Diff: xfa/fwl/cfwl_monthcalendar.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_listbox.cpp ('k') | xfa/fwl/cfwl_picturebox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/cfwl_monthcalendar.cpp
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index 94d198599d3a2d6c87f143385ef87be1286c0309..c93ee044911ebcea01641560a4a80bccf998d421 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -601,7 +601,7 @@ void CFWL_MonthCalendar::CalcTodaySize() {
}
void CFWL_MonthCalendar::Layout() {
- GetClientRect(m_rtClient);
+ m_rtClient = GetClientRect();
m_rtHead.Set(
m_rtClient.left + MONTHCAL_HEADER_BTN_HMARGIN, m_rtClient.top,
@@ -934,15 +934,15 @@ void CFWL_MonthCalendar::OnLButtonDown(CFWL_MessageMouse* pMsg) {
if (m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_iLBtnPartStates = CFWL_PartState_Pressed;
PrevMonth();
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
} else if (m_rtRBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_iRBtnPartStates |= CFWL_PartState_Pressed;
NextMonth();
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
} else if (m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy)) {
if ((m_pProperties->m_dwStyleExes & FWL_STYLEEXT_MCD_NoToday) == 0) {
JumpToToday();
- Repaint(&m_rtClient);
+ RepaintRect(m_rtClient);
}
} else {
CFWL_DateTimePicker* pIPicker = static_cast<CFWL_DateTimePicker*>(m_pOuter);
@@ -957,12 +957,12 @@ void CFWL_MonthCalendar::OnLButtonUp(CFWL_MessageMouse* pMsg) {
if (m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_iLBtnPartStates = 0;
- Repaint(&m_rtLBtn);
+ RepaintRect(m_rtLBtn);
return;
}
if (m_rtRBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_iRBtnPartStates = 0;
- Repaint(&m_rtRBtn);
+ RepaintRect(m_rtRBtn);
return;
}
if (m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy))
@@ -998,12 +998,12 @@ void CFWL_MonthCalendar::OnLButtonUp(CFWL_MessageMouse* pMsg) {
void CFWL_MonthCalendar::DisForm_OnLButtonUp(CFWL_MessageMouse* pMsg) {
if (m_rtLBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_iLBtnPartStates = 0;
- Repaint(&(m_rtLBtn));
+ RepaintRect(m_rtLBtn);
return;
}
if (m_rtRBtn.Contains(pMsg->m_fx, pMsg->m_fy)) {
m_iRBtnPartStates = 0;
- Repaint(&(m_rtRBtn));
+ RepaintRect(m_rtRBtn);
return;
}
if (m_rtToday.Contains(pMsg->m_fx, pMsg->m_fy))
@@ -1060,7 +1060,7 @@ void CFWL_MonthCalendar::OnMouseMove(CFWL_MessageMouse* pMsg) {
m_iHovered = -1;
}
if (bRepaint && !rtInvalidate.IsEmpty())
- Repaint(&rtInvalidate);
+ RepaintRect(rtInvalidate);
}
void CFWL_MonthCalendar::OnMouseLeave(CFWL_MessageMouse* pMsg) {
@@ -1072,7 +1072,7 @@ void CFWL_MonthCalendar::OnMouseLeave(CFWL_MessageMouse* pMsg) {
GetDayRect(m_iHovered, rtInvalidate);
m_iHovered = -1;
if (!rtInvalidate.IsEmpty())
- Repaint(&rtInvalidate);
+ RepaintRect(rtInvalidate);
}
CFWL_MonthCalendar::DATEINFO::DATEINFO(int32_t day,
« no previous file with comments | « xfa/fwl/cfwl_listbox.cpp ('k') | xfa/fwl/cfwl_picturebox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698