summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fwl/theme/cfwl_edittp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_listboxtp.cpp4
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.cpp20
-rw-r--r--xfa/fwl/theme/cfwl_widgettp.h1
4 files changed, 9 insertions, 20 deletions
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index a83b1b4bdf..2c09f398f3 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -54,9 +54,7 @@ void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (pParams->m_pPath) {
CFX_Graphics* pGraphics = pParams->m_pGraphics;
pGraphics->SaveGraphState();
- CFX_Color crSelected(FWL_GetThemeColor(0) == 0
- ? FWLTHEME_COLOR_BKSelected
- : FWLTHEME_COLOR_Green_BKSelected);
+ CFX_Color crSelected(FWLTHEME_COLOR_BKSelected);
pGraphics->SetFillColor(&crSelected);
pGraphics->FillPath(pParams->m_pPath, FXFILL_WINDING,
&pParams->m_matrix);
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 3731097f24..9851349f71 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -85,9 +85,7 @@ void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
if (dwStates & CFWL_PartState_Selected) {
pGraphics->SaveGraphState();
- CFX_Color crFill(FWL_GetThemeColor(0) == 0
- ? FWLTHEME_COLOR_BKSelected
- : FWLTHEME_COLOR_Green_BKSelected);
+ CFX_Color crFill(FWLTHEME_COLOR_BKSelected);
pGraphics->SetFillColor(&crFill);
CFX_RectF rt(*prtItem);
CFX_Path path;
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index ab8256ce83..0a33a82a0a 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -197,9 +197,7 @@ void CFWL_WidgetTP::DrawEdge(CFX_Graphics* pGraphics,
if (!pRect)
return;
pGraphics->SaveGraphState();
- CFX_Color crStroke(FWL_GetThemeColor(0) == 0
- ? ArgbEncode(255, 127, 157, 185)
- : FWLTHEME_COLOR_Green_BKSelected);
+ CFX_Color crStroke(ArgbEncode(255, 127, 157, 185));
pGraphics->SetStrokeColor(&crStroke);
CFX_Path path;
path.Create();
@@ -594,9 +592,9 @@ void CFWL_WidgetTP::DrawBtn(CFX_Graphics* pGraphics,
CFX_Matrix* pMatrix) {
CFX_Path path;
path.Create();
- if (!CFWL_ArrowData::HasInstance()) {
- CFWL_ArrowData::GetInstance()->SetColorData(FWL_GetThemeColor(0));
- }
+ if (!CFWL_ArrowData::HasInstance())
+ CFWL_ArrowData::GetInstance()->SetColorData(0);
+
CFWL_ArrowData::CColorData* pColorData =
CFWL_ArrowData::GetInstance()->m_pColorData.get();
FX_FLOAT fRight = pRect->right();
@@ -618,9 +616,9 @@ void CFWL_WidgetTP::DrawArrowBtn(CFX_Graphics* pGraphics,
FWLTHEME_STATE eState,
CFX_Matrix* pMatrix) {
DrawBtn(pGraphics, pRect, eState, pMatrix);
- if (!CFWL_ArrowData::HasInstance()) {
- CFWL_ArrowData::GetInstance()->SetColorData(FWL_GetThemeColor(0));
- }
+ if (!CFWL_ArrowData::HasInstance())
+ CFWL_ArrowData::GetInstance()->SetColorData(0);
+
CFWL_ArrowData::CColorData* pColorData =
CFWL_ArrowData::GetInstance()->m_pColorData.get();
DrawArrow(pGraphics, pRect, eDict, pColorData->clrSign[eState - 1], pMatrix);
@@ -694,7 +692,3 @@ void FWLTHEME_Release() {
CFWL_ArrowData::DestroyInstance();
CFWL_FontManager::DestroyInstance();
}
-
-uint32_t FWL_GetThemeColor(uint32_t dwThemeID) {
- return 0x0000ffff & dwThemeID;
-}
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index bc546453d0..f96a7666b3 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -219,7 +219,6 @@ class CFWL_WidgetTP {
};
void FWLTHEME_Release();
-uint32_t FWL_GetThemeColor(uint32_t dwThemeID);
class CFWL_FontData {
public: