diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-16 13:54:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-16 13:54:01 -0800 |
commit | 058d2d6b7851b77a371bb4d37d5da1148794397a (patch) | |
tree | ce0d9ba4397c1314dec15334dff6ac5dac261bf4 /xfa/fwl/core/ifwl_picturebox.cpp | |
parent | 8a3aa459fc5284f51bcd7e98e95bf6214f47bb67 (diff) | |
download | pdfium-058d2d6b7851b77a371bb4d37d5da1148794397a.tar.xz |
Continue formatting fwl/core
Review-Url: https://codereview.chromium.org/2510793003
Diffstat (limited to 'xfa/fwl/core/ifwl_picturebox.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_picturebox.cpp | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp index 19db6f59fa..38685f73b1 100644 --- a/xfa/fwl/core/ifwl_picturebox.cpp +++ b/xfa/fwl/core/ifwl_picturebox.cpp @@ -26,23 +26,23 @@ FWL_Type IFWL_PictureBox::GetClassID() const { } void IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { - if (bAutoSize) { - rect.Set(0, 0, 0, 0); - if (!m_pProperties->m_pDataProvider) - return; - IFWL_Widget::GetWidgetRect(rect, true); - } else { + if (!bAutoSize) { rect = m_pProperties->m_rtWidget; + return; } + + rect.Set(0, 0, 0, 0); + if (!m_pProperties->m_pDataProvider) + return; + IFWL_Widget::GetWidgetRect(rect, true); } void IFWL_PictureBox::Update() { - if (IsLocked()) { + if (IsLocked()) return; - } - if (!m_pProperties->m_pThemeProvider) { + if (!m_pProperties->m_pThemeProvider) m_pProperties->m_pThemeProvider = GetAvailableTheme(); - } + GetClientRect(m_rtClient); } @@ -52,20 +52,12 @@ void IFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics, return; if (!m_pProperties->m_pThemeProvider) return; + IFWL_ThemeProvider* pTheme = GetAvailableTheme(); - if (HasBorder()) { + if (HasBorder()) DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); - } - if (HasEdge()) { + if (HasEdge()) DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); - } - DrawBkground(pGraphics, pTheme, pMatrix); -} - -void IFWL_PictureBox::DrawBkground(CFX_Graphics* pGraphics, - IFWL_ThemeProvider* pTheme, - const CFX_Matrix* pMatrix) { - return; } void IFWL_PictureBox::OnDrawWidget(CFX_Graphics* pGraphics, |