git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41464
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( m_renderer )
rectBorder = m_renderer->GetBorderDimensions(GetBorder());
if ( m_renderer )
rectBorder = m_renderer->GetBorderDimensions(GetBorder());
- bool inside = m_renderer->AreScrollbarsInsideBorder();
-
if ( width )
{
#if wxUSE_SCROLLBAR
if ( width )
{
#if wxUSE_SCROLLBAR
w -= m_scrollbarVert->GetSize().x;
#endif // wxUSE_SCROLLBAR
w -= m_scrollbarVert->GetSize().x;
#endif // wxUSE_SCROLLBAR
- // if we don't have scrollbar or if it is outside the border (and not
- // blended into it), take account of the right border as well
- if (
-#if wxUSE_SCROLLBAR
- !m_scrollbarVert ||
-#endif // wxUSE_SCROLLBAR
- inside )
- w -= rectBorder.width;
-
- // and always account for the left border
- *width = w - rectBorder.x;
+ // account for the left and right borders
+ *width = w - rectBorder.x - rectBorder.width;
// we shouldn't return invalid width
if ( *width < 0 )
// we shouldn't return invalid width
if ( *width < 0 )
h -= m_scrollbarHorz->GetSize().y;
#endif // wxUSE_SCROLLBAR
h -= m_scrollbarHorz->GetSize().y;
#endif // wxUSE_SCROLLBAR
- if (
-#if wxUSE_SCROLLBAR
- !m_scrollbarHorz ||
-#endif // wxUSE_SCROLLBAR
- inside )
- h -= rectBorder.height;
-
- *height = h - rectBorder.y;
+ *height = h - rectBorder.y - rectBorder.height;
// we shouldn't return invalid height
if ( *height < 0 )
// we shouldn't return invalid height
if ( *height < 0 )
// and the scrollbars (as they may be offset into the border, use the
// scrollbar position, not size - this supposes that PositionScrollbars()
// had been called before)
// and the scrollbars (as they may be offset into the border, use the
// scrollbar position, not size - this supposes that PositionScrollbars()
// had been called before)
- bool inside = m_renderer->AreScrollbarsInsideBorder();
wxSize size = GetSize();
#if wxUSE_SCROLLBAR
if ( m_scrollbarVert )
width += size.x - m_scrollbarVert->GetPosition().x;
#endif // wxUSE_SCROLLBAR
wxSize size = GetSize();
#if wxUSE_SCROLLBAR
if ( m_scrollbarVert )
width += size.x - m_scrollbarVert->GetPosition().x;
#endif // wxUSE_SCROLLBAR
- if (
-#if wxUSE_SCROLLBAR
- !m_scrollbarVert ||
-#endif // wxUSE_SCROLLBAR
- inside )
- width += rectBorder.width;
+ width += rectBorder.width;
#if wxUSE_SCROLLBAR
if ( m_scrollbarHorz )
height += size.y - m_scrollbarHorz->GetPosition().y;
#endif // wxUSE_SCROLLBAR
#if wxUSE_SCROLLBAR
if ( m_scrollbarHorz )
height += size.y - m_scrollbarHorz->GetPosition().y;
#endif // wxUSE_SCROLLBAR
- if (
-#if wxUSE_SCROLLBAR
- !m_scrollbarHorz ||
-#endif // wxUSE_SCROLLBAR
- inside )
- height += rectBorder.height;
+ height += rectBorder.height;
wxWindowNative::DoSetClientSize(width, height);
}
wxWindowNative::DoSetClientSize(width, height);
}