diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-17 18:14:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-17 18:14:25 -0700 |
commit | 878dd5b121b38e6eaba5b3f3a90d0a9abf60feaf (patch) | |
tree | 6b490d5e54c0d2e213d18b5e4bfe106f61eb1390 /xfa/fwl/basewidget/fwl_scrollbarimp.cpp | |
parent | 8021a646f18d76518be32c36907a04f213a0e21c (diff) | |
download | pdfium-878dd5b121b38e6eaba5b3f3a90d0a9abf60feaf.tar.xz |
Cleanup unneeded FWL theme code.
This CL removes FWL theme code methods which do not have implementations.
Review-Url: https://codereview.chromium.org/2422373002
Diffstat (limited to 'xfa/fwl/basewidget/fwl_scrollbarimp.cpp')
-rw-r--r-- | xfa/fwl/basewidget/fwl_scrollbarimp.cpp | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp index 15b1d911b5..7e68ea2272 100644 --- a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp +++ b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp @@ -318,43 +318,26 @@ void CFWL_ScrollBarImp::CalcButtonLen() { } } void CFWL_ScrollBarImp::CalcMinButtonRect(CFX_RectF& rect) { - if (m_bCustomLayout) { - IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; - CFWL_ThemePart pPart; - pPart.m_rtPart = m_rtMinBtn; - pPart.m_pWidget = m_pInterface; - pPart.m_iPart = CFWL_Part::ForeArrow; - pPart.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) - ? CFWL_PartState_Disabled - : m_iMinButtonState; - pTheme->GetPartRect(&pPart, rect); - } else { - rect.left = m_rtClient.left; - rect.top = m_rtClient.top; - rect.width = IsVertical() ? m_rtClient.width : m_fButtonLen; - rect.height = IsVertical() ? m_fButtonLen : m_rtClient.height; - } + if (m_bCustomLayout) + return; + + rect.left = m_rtClient.left; + rect.top = m_rtClient.top; + rect.width = IsVertical() ? m_rtClient.width : m_fButtonLen; + rect.height = IsVertical() ? m_fButtonLen : m_rtClient.height; } + void CFWL_ScrollBarImp::CalcMaxButtonRect(CFX_RectF& rect) { - if (m_bCustomLayout) { - IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; - CFWL_ThemePart pPart; - pPart.m_rtPart = m_rtMaxBtn; - pPart.m_pWidget = m_pInterface; - pPart.m_iPart = CFWL_Part::BackArrow; - pPart.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) - ? CFWL_PartState_Disabled - : m_iMaxButtonState; - pTheme->GetPartRect(&pPart, rect); - } else { - rect.left = - IsVertical() ? m_rtClient.left : m_rtClient.right() - m_fButtonLen; - rect.top = - IsVertical() ? m_rtClient.bottom() - m_fButtonLen : m_rtClient.top; - rect.width = IsVertical() ? m_rtClient.width : m_fButtonLen; - rect.height = IsVertical() ? m_fButtonLen : m_rtClient.height; - } + if (m_bCustomLayout) + return; + + rect.left = + IsVertical() ? m_rtClient.left : m_rtClient.right() - m_fButtonLen; + rect.top = IsVertical() ? m_rtClient.bottom() - m_fButtonLen : m_rtClient.top; + rect.width = IsVertical() ? m_rtClient.width : m_fButtonLen; + rect.height = IsVertical() ? m_fButtonLen : m_rtClient.height; } + void CFWL_ScrollBarImp::CalcThumbButtonRect(CFX_RectF& rect) { if (!IsEnabled()) { m_rtThumb.Reset(); |