summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/cfwl_widget.cpp')
-rw-r--r--xfa/fwl/cfwl_widget.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 7da12fcfba..301ad5fc9d 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -292,11 +292,10 @@ CFX_RectF CFWL_Widget::GetEdgeRect() {
}
FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) {
- FX_FLOAT* pfBorder = static_cast<FX_FLOAT*>(GetThemeCapacity(
- bCX ? CFWL_WidgetCapacity::CXBorder : CFWL_WidgetCapacity::CYBorder));
- if (!pfBorder)
- return 0;
- return *pfBorder;
+ IFWL_ThemeProvider* theme = GetAvailableTheme();
+ if (!theme)
+ return 0.0f;
+ return bCX ? theme->GetCXBorderSize() : theme->GetCYBorderSize();
}
CFX_RectF CFWL_Widget::GetRelativeRect() {
@@ -306,16 +305,6 @@ CFX_RectF CFWL_Widget::GetRelativeRect() {
return rect;
}
-void* CFWL_Widget::GetThemeCapacity(CFWL_WidgetCapacity dwCapacity) {
- IFWL_ThemeProvider* pTheme = GetAvailableTheme();
- if (!pTheme)
- return nullptr;
-
- CFWL_ThemePart part;
- part.m_pWidget = this;
- return pTheme->GetCapacity(&part, dwCapacity);
-}
-
IFWL_ThemeProvider* CFWL_Widget::GetAvailableTheme() {
if (m_pProperties->m_pThemeProvider)
return m_pProperties->m_pThemeProvider;