From 8f4bf9a8ac211e150f7fa4d8ed061f264cb3aa9e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 4 May 2016 13:51:51 -0700 Subject: More define cleanup. This CL converts defines into constants, enums, enum classes or removes them as needed. Review-Url: https://codereview.chromium.org/1938163002 --- xfa/fwl/theme/cfwl_scrollbartp.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'xfa/fwl/theme/cfwl_scrollbartp.cpp') diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp index 0913a8daa2..b1acd21969 100644 --- a/xfa/fwl/theme/cfwl_scrollbartp.cpp +++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp @@ -13,7 +13,11 @@ #include "xfa/fxgraphics/cfx_color.h" #include "xfa/fxgraphics/cfx_path.h" -#define FWL_SCROLL_PawLen 12.5f +namespace { + +const float kPawLength = 12.5f; + +} // namespace CFWL_ScrollBarTP::CFWL_ScrollBarTP() : m_pThemeData(new SBThemeData) { SetThemeData(0); @@ -150,7 +154,7 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics, CFX_Path path; path.Create(); if (bVert) { - FX_FLOAT fPawLen = FWL_SCROLL_PawLen; + FX_FLOAT fPawLen = kPawLength; if (pRect->width / 2 <= fPawLen) { fPawLen = (pRect->width - 6) / 2; } @@ -183,7 +187,7 @@ void CFWL_ScrollBarTP::DrawPaw(CFX_Graphics* pGraphics, pGraphics->SetStrokeColor(&clrDark); pGraphics->StrokePath(&path, pMatrix); } else { - FX_FLOAT fPawLen = FWL_SCROLL_PawLen; + FX_FLOAT fPawLen = kPawLength; if (pRect->height / 2 <= fPawLen) { fPawLen = (pRect->height - 6) / 2; } -- cgit v1.2.3