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

Unified Diff: xfa/fwl/core/cfwl_checkbox.cpp

Issue 2556873004: Convert GetWidgetRect to return rect. (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/core/cfwl_checkbox.h ('k') | xfa/fwl/core/cfwl_combobox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/cfwl_checkbox.cpp
diff --git a/xfa/fwl/core/cfwl_checkbox.cpp b/xfa/fwl/core/cfwl_checkbox.cpp
index 4183551f68df61bc0e69bbe1e13c50bf65ec7dcd..8d99d7acf5f4840dcba90190999e639261abaa33 100644
--- a/xfa/fwl/core/cfwl_checkbox.cpp
+++ b/xfa/fwl/core/cfwl_checkbox.cpp
@@ -50,29 +50,6 @@ void CFWL_CheckBox::SetBoxSize(FX_FLOAT fHeight) {
m_fBoxHeight = fHeight;
}
-void CFWL_CheckBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
- if (!bAutoSize) {
- rect = m_pProperties->m_rtWidget;
- return;
- }
-
- rect.Set(0, 0, 0, 0);
- if (!m_pProperties->m_pThemeProvider)
- m_pProperties->m_pThemeProvider = GetAvailableTheme();
- if (!m_pProperties->m_pThemeProvider)
- return;
-
- CFX_SizeF sz = CalcTextSize(
- L"Check box", m_pProperties->m_pThemeProvider,
- !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CKB_MultiLine));
- rect.Set(0, 0, sz.x, sz.y);
- rect.Inflate(kCaptionMargin, kCaptionMargin);
-
- rect.width += m_fBoxHeight;
- rect.height = std::max(rect.height, m_fBoxHeight);
- InflateWidgetRect(rect);
-}
-
void CFWL_CheckBox::Update() {
if (IsLocked())
return;
@@ -308,8 +285,7 @@ void CFWL_CheckBox::NextStates() {
if (pCheckBox != this &&
pCheckBox->GetStates() & FWL_STATE_CKB_Checked) {
pCheckBox->SetCheckState(0);
- CFX_RectF rt;
- pCheckBox->GetWidgetRect(rt, false);
+ CFX_RectF rt = pCheckBox->GetWidgetRect();
rt.left = rt.top = 0;
m_pWidgetMgr->RepaintWidget(pCheckBox, &rt);
break;
« no previous file with comments | « xfa/fwl/core/cfwl_checkbox.h ('k') | xfa/fwl/core/cfwl_combobox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698