From b7675f63684ebff68c688a1c7b160596b6747c3e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 4 May 2016 14:11:13 -0700 Subject: Cleanup CFWL_ThemePart data. The m_dwData pointer was being used as a generic way to pass around data. There were only two places we were reading that data. This Cl changes to have two specific flags and removes the generic pointer. Review-Url: https://codereview.chromium.org/1950973003 --- xfa/fwl/theme/cfwl_edittp.cpp | 4 +--- xfa/fwl/theme/cfwl_formtp.cpp | 4 ++-- xfa/fwl/theme/cfwl_formtp.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) (limited to 'xfa/fwl/theme') diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp index 8f060ee6bf..e557e6606b 100644 --- a/xfa/fwl/theme/cfwl_edittp.cpp +++ b/xfa/fwl/theme/cfwl_edittp.cpp @@ -43,14 +43,12 @@ FX_BOOL CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) { &pParams->m_matrix); pGraphics->RestoreGraphState(); } else { - FX_BOOL bStatic = - pParams->m_dwData == FWL_PARTDATA_EDT_StaticBackground; CFX_Path path; path.Create(); path.AddRectangle(pParams->m_rtPart.left, pParams->m_rtPart.top, pParams->m_rtPart.width, pParams->m_rtPart.height); CFX_Color cr(FWLTHEME_COLOR_Background); - if (!bStatic) { + if (!pParams->m_bStaticBackground) { if (pParams->m_dwStates & CFWL_PartState_Disabled) cr.Set(FWLTHEME_COLOR_EDGERB1); else if (pParams->m_dwStates & CFWL_PartState_ReadOnly) diff --git a/xfa/fwl/theme/cfwl_formtp.cpp b/xfa/fwl/theme/cfwl_formtp.cpp index 65d070b6b7..6fd3453e69 100644 --- a/xfa/fwl/theme/cfwl_formtp.cpp +++ b/xfa/fwl/theme/cfwl_formtp.cpp @@ -137,7 +137,7 @@ FX_BOOL CFWL_FormTP::DrawBackground(CFWL_ThemeBackground* pParams) { } case CFWL_Part::MaximizeBox: { DrawMaximizeBox(pParams->m_pGraphics, &pParams->m_rtPart, eState, - pParams->m_dwData, &pParams->m_matrix, iActive); + pParams->m_bMaximize, &pParams->m_matrix, iActive); break; } case CFWL_Part::Icon: { @@ -515,7 +515,7 @@ void CFWL_FormTP::DrawMinimizeBox(CFX_Graphics* pGraphics, void CFWL_FormTP::DrawMaximizeBox(CFX_Graphics* pGraphics, const CFX_RectF* pRect, FWLTHEME_STATE eState, - FX_BOOL bMax, + bool bMax, CFX_Matrix* pMatrix, int32_t iActive) { DrawMinMaxBoxCommon(pGraphics, pRect, eState, pMatrix); diff --git a/xfa/fwl/theme/cfwl_formtp.h b/xfa/fwl/theme/cfwl_formtp.h index 24eaed8f85..6086eca80e 100644 --- a/xfa/fwl/theme/cfwl_formtp.h +++ b/xfa/fwl/theme/cfwl_formtp.h @@ -67,7 +67,7 @@ class CFWL_FormTP : public CFWL_WidgetTP { void DrawMaximizeBox(CFX_Graphics* pGraphics, const CFX_RectF* pRect, FWLTHEME_STATE eState, - FX_BOOL bMax, + bool bMax, CFX_Matrix* pMatrix, int32_t iActive = 0); void DrawIconImage(CFX_Graphics* pGraphics, -- cgit v1.2.3