summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 54dfbe5531..aa801adb6e 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -51,20 +51,12 @@ FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
return FALSE;
IFWL_Widget* pWidget = pParams->m_pWidget;
FWLTHEME_STATE eState = FWLTHEME_STATE_Normal;
- switch (pParams->m_dwStates & 0x03) {
- case CFWL_PartState_Hovered: {
- eState = FWLTHEME_STATE_Hover;
- break;
- }
- case CFWL_PartState_Pressed: {
- eState = FWLTHEME_STATE_Pressed;
- break;
- }
- case CFWL_PartState_Disabled: {
- eState = FWLTHEME_STATE_Disabale;
- break;
- }
- }
+ if (pParams->m_dwStates & CFWL_PartState_Hovered)
+ eState = FWLTHEME_STATE_Hover;
+ else if (pParams->m_dwStates & CFWL_PartState_Pressed)
+ eState = FWLTHEME_STATE_Pressed;
+ else if (pParams->m_dwStates & CFWL_PartState_Disabled)
+ eState = FWLTHEME_STATE_Disabale;
CFX_Graphics* pGraphics = pParams->m_pGraphics;
CFX_RectF* pRect = &pParams->m_rtPart;
FX_BOOL bVert = pWidget->GetStylesEx();