Index: xfa/fwl/core/cfwl_pushbutton.cpp |
diff --git a/xfa/fwl/core/cfwl_pushbutton.cpp b/xfa/fwl/core/cfwl_pushbutton.cpp |
index a2f9b5f1cf99e63c1e24470e72aaabed9f8a7275..d210b02b31bd5d9b4550cfcfbb56d319a7bde4cc 100644 |
--- a/xfa/fwl/core/cfwl_pushbutton.cpp |
+++ b/xfa/fwl/core/cfwl_pushbutton.cpp |
@@ -35,20 +35,19 @@ FWL_Type CFWL_PushButton::GetClassID() const { |
return FWL_Type::PushButton; |
} |
-void CFWL_PushButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { |
- if (!bAutoSize) { |
- rect = m_pProperties->m_rtWidget; |
- return; |
- } |
+CFX_RectF CFWL_PushButton::GetWidgetRect(bool bAutoSize) { |
+ if (!bAutoSize) |
+ return m_pProperties->m_rtWidget; |
- rect.Set(0, 0, 0, 0); |
if (!m_pProperties->m_pThemeProvider) |
m_pProperties->m_pThemeProvider = GetAvailableTheme(); |
FX_FLOAT* fcaption = |
static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin)); |
+ CFX_RectF rect; |
rect.Inflate(*fcaption, *fcaption); |
InflateWidgetRect(rect); |
+ return rect; |
} |
void CFWL_PushButton::SetStates(uint32_t dwStates) { |