summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_comboboxtp.cpp
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-08-22 13:37:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-22 13:37:04 -0700
commit9b99ebf5159d98cc83fb2e8ebac6750e158841d6 (patch)
treefd8fa25abf4be216e50d62dfce8cfc694efc3a97 /xfa/fwl/theme/cfwl_comboboxtp.cpp
parent28a4a2410f24910c709578d981cae3bb8153fdba (diff)
downloadpdfium-9b99ebf5159d98cc83fb2e8ebac6750e158841d6.tar.xz
Make CFX_Color constructor explicit
Change the places which require implicit construction, and make the construction from ARGB_Color explicit. Review-Url: https://codereview.chromium.org/2263923003
Diffstat (limited to 'xfa/fwl/theme/cfwl_comboboxtp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_comboboxtp.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index 92f2296105..9fdb776820 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -47,18 +47,19 @@ FX_BOOL CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
path.Create();
CFX_RectF& rect = pParams->m_rtPart;
path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
- CFX_Color cr;
+ FX_ARGB argb_color;
switch (pParams->m_dwStates) {
case CFWL_PartState_Selected:
- cr = FWLTHEME_COLOR_BKSelected;
+ argb_color = FWLTHEME_COLOR_BKSelected;
break;
case CFWL_PartState_Disabled:
- cr = FWLTHEME_COLOR_EDGERB1;
+ argb_color = FWLTHEME_COLOR_EDGERB1;
break;
default:
- cr = 0xFFFFFFFF;
+ argb_color = 0xFFFFFFFF;
}
pParams->m_pGraphics->SaveGraphState();
+ CFX_Color cr(argb_color);
pParams->m_pGraphics->SetFillColor(&cr);
pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams->m_matrix);
pParams->m_pGraphics->RestoreGraphState();