summaryrefslogtreecommitdiff
path: root/xfa/fwl/theme/cfwl_scrollbartp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-13 12:04:43 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-13 12:04:43 -0700
commit380f20a6000bd640d7fd8f1567961f1f05d79f5a (patch)
treeba8dd6ef2825381171eca97a3b90de9fd7d9ed07 /xfa/fwl/theme/cfwl_scrollbartp.cpp
parenta654f0d0889c50d0995bd873c119ae75b0ab5a09 (diff)
downloadpdfium-380f20a6000bd640d7fd8f1567961f1f05d79f5a.tar.xz
Remove some FWL code.
Remove unused or ifdef'd code from FWL. Review URL: https://codereview.chromium.org/1874963002
Diffstat (limited to 'xfa/fwl/theme/cfwl_scrollbartp.cpp')
-rw-r--r--xfa/fwl/theme/cfwl_scrollbartp.cpp72
1 files changed, 2 insertions, 70 deletions
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index c6a14f8e94..5db0559195 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -97,7 +97,7 @@ FX_BOOL CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
}
return TRUE;
}
-#ifdef THEME_XPSimilar
+
void CFWL_ScrollBarTP::DrawThumbBtn(CFX_Graphics* pGraphics,
const CFX_RectF* pRect,
FX_BOOL bVert,
@@ -266,75 +266,7 @@ void CFWL_ScrollBarTP::DrawMaxMinBtn(CFX_Graphics* pGraphics,
rtArrowBtn.Deflate(1, 1, 1, 1);
DrawArrowBtn(pGraphics, &rtArrowBtn, eDict, eState, pMatrix);
}
-#else
-void CFWL_ScrollBarTP::DrawThumbBtn(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FX_BOOL bVert,
- FWLTHEME_STATE eState,
- FX_BOOL bPawButton,
- CFX_Matrix* pMatrix) {
- if (pRect->IsEmpty()) {
- return;
- }
- CFX_RectF rtThumb(*pRect);
- FX_FLOAT fWidth = 2;
- Draw3DRect(pGraphics, FWLTHEME_EDGE_Raised, fWidth, pRect,
- FWLTHEME_COLOR_EDGELT1, FWLTHEME_COLOR_EDGELT2,
- FWLTHEME_COLOR_EDGERB1, FWLTHEME_COLOR_EDGERB2, pMatrix);
- CFX_Path path;
- path.Create();
- path.AddRectangle(pRect->left + fWidth, pRect->top + fWidth,
- pRect->width - 2 * fWidth, pRect->height - 2 * fWidth);
- pGraphics->SaveGraphState();
- CFX_Color crFill(FWLTHEME_COLOR_Background);
- pGraphics->SetFillColor(&crFill);
- pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
- pGraphics->RestoreGraphState();
-}
-void CFWL_ScrollBarTP::DrawTrack(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FX_BOOL bVert,
- FWLTHEME_STATE eState,
- FX_BOOL bLowerTrack,
- CFX_Matrix* pMatrix) {
- if (pRect->IsEmpty()) {
- return;
- }
- CFX_Path path;
- path.Create();
- path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
- pGraphics->SaveGraphState();
- CFX_Color clrFill(0xFFF0F0F0);
- pGraphics->SetFillColor(&clrFill);
- pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
- pGraphics->RestoreGraphState();
-}
-void CFWL_ScrollBarTP::DrawMaxMinBtn(CFX_Graphics* pGraphics,
- const CFX_RectF* pRect,
- FWLTHEME_DIRECTION eDict,
- FWLTHEME_STATE eState,
- CFX_Matrix* pMatrix) {
- CFX_RectF rtThumb(*pRect);
- FX_FLOAT fWidth = eState == FWLTHEME_STATE_Pressed ? 1.0f : 2.0f;
- FWLTHEME_EDGE eType = eState == FWLTHEME_STATE_Pressed ? FWLTHEME_EDGE_Flat
- : FWLTHEME_EDGE_Raised;
- Draw3DRect(pGraphics, eType, fWidth, pRect, FWLTHEME_COLOR_EDGELT1,
- FWLTHEME_COLOR_EDGELT2, FWLTHEME_COLOR_EDGERB1,
- FWLTHEME_COLOR_EDGERB2, pMatrix);
- CFX_Path path;
- path.Create();
- path.AddRectangle(pRect->left + fWidth, pRect->top + fWidth,
- pRect->width - 2 * fWidth, pRect->height - 2 * fWidth);
- pGraphics->SaveGraphState();
- CFX_Color crFill(FWLTHEME_COLOR_Background);
- pGraphics->SetFillColor(&crFill);
- pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
- pGraphics->RestoreGraphState();
- DrawArrow(pGraphics, pRect, eDict,
- eState == FWLTHEME_STATE_Disabale ? 0xFFA0A0A0 : 0xFF000000,
- eState == FWLTHEME_STATE_Pressed, pMatrix);
-}
-#endif
+
void CFWL_ScrollBarTP::SetThemeData(uint32_t dwID) {
m_pThemeData->clrPawColorLight[3] = ArgbEncode(0xff, 208, 223, 172);
m_pThemeData->clrPawColorDark[3] = ArgbEncode(0xff, 140, 157, 115);