summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_pushbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core/ifwl_pushbutton.cpp')
-rw-r--r--xfa/fwl/core/ifwl_pushbutton.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp
index 8ee0485b11..9589de1c3c 100644
--- a/xfa/fwl/core/ifwl_pushbutton.cpp
+++ b/xfa/fwl/core/ifwl_pushbutton.cpp
@@ -47,16 +47,6 @@ void IFWL_PushButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
if (!m_pProperties->m_pThemeProvider)
m_pProperties->m_pThemeProvider = GetAvailableTheme();
- CFX_WideString wsCaption;
- if (m_pProperties->m_pDataProvider)
- m_pProperties->m_pDataProvider->GetCaption(this, wsCaption);
-
- int32_t iLen = wsCaption.GetLength();
- if (iLen > 0) {
- CFX_SizeF sz = CalcTextSize(wsCaption, m_pProperties->m_pThemeProvider);
- rect.Set(0, 0, sz.x, sz.y);
- }
-
FX_FLOAT* fcaption =
static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin));
rect.Inflate(*fcaption, *fcaption);
@@ -92,7 +82,6 @@ void IFWL_PushButton::DrawWidget(CFX_Graphics* pGraphics,
if (!m_pProperties->m_pThemeProvider)
return;
- IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider;
if (HasBorder()) {
DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider,
pMatrix);
@@ -102,26 +91,6 @@ void IFWL_PushButton::DrawWidget(CFX_Graphics* pGraphics,
pMatrix);
}
DrawBkground(pGraphics, m_pProperties->m_pThemeProvider, pMatrix);
- CFX_Matrix matrix;
- matrix.Concat(*pMatrix);
-
- CFX_WideString wsCaption;
- if (m_pProperties->m_pDataProvider)
- m_pProperties->m_pDataProvider->GetCaption(this, wsCaption);
-
- CFX_RectF rtText;
- rtText.Set(0, 0, 0, 0);
- if (!wsCaption.IsEmpty())
- CalcTextRect(wsCaption, pTheme, 0, m_iTTOAlign, rtText);
-
- switch (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_PSB_ModeMask) {
- case FWL_STYLEEXT_PSB_TextOnly:
- DrawText(pGraphics, m_pProperties->m_pThemeProvider, &matrix);
- break;
- case FWL_STYLEEXT_PSB_IconOnly:
- case FWL_STYLEEXT_PSB_TextIcon:
- break;
- }
}
void IFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics,
@@ -140,31 +109,6 @@ void IFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics,
pTheme->DrawBackground(&param);
}
-void IFWL_PushButton::DrawText(CFX_Graphics* pGraphics,
- IFWL_ThemeProvider* pTheme,
- const CFX_Matrix* pMatrix) {
- if (!m_pProperties->m_pDataProvider)
- return;
-
- CFX_WideString wsCaption;
- m_pProperties->m_pDataProvider->GetCaption(this, wsCaption);
- if (wsCaption.IsEmpty())
- return;
-
- CFWL_ThemeText param;
- param.m_pWidget = this;
- param.m_iPart = CFWL_Part::Caption;
- param.m_dwStates = GetPartStates();
- param.m_pGraphics = pGraphics;
- if (pMatrix)
- param.m_matrix.Concat(*pMatrix);
- param.m_rtPart = m_rtCaption;
- param.m_wsText = wsCaption;
- param.m_dwTTOStyles = m_dwTTOStyles;
- param.m_iTTOAlign = m_iTTOAlign;
- pTheme->DrawText(&param);
-}
-
uint32_t IFWL_PushButton::GetPartStates() {
uint32_t dwStates = CFWL_PartState_Normal;
if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)