Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(556)

Unified Diff: xfa/fwl/basewidget/fwl_scrollbarimp.cpp

Issue 2422373002: Cleanup unneeded FWL theme code. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_listboximp.cpp ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/basewidget/fwl_scrollbarimp.cpp
diff --git a/xfa/fwl/basewidget/fwl_scrollbarimp.cpp b/xfa/fwl/basewidget/fwl_scrollbarimp.cpp
index 15b1d911b5e7e0cea4db460d38174ebed3f411e0..7e68ea22723861c92ba7c74c54a8eb69a7d4b381 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();
« no previous file with comments | « xfa/fwl/basewidget/fwl_listboximp.cpp ('k') | xfa/fwl/core/fwl_formimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698