fix infinite sizing loop with GTK3 when using a non-default target window, closes #16668

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-11-10 04:13:18 +00:00
parent 29e01a5808
commit 8d7e0d0452
2 changed files with 13 additions and 0 deletions

View File

@@ -581,6 +581,11 @@ All (GUI):
- Fix several floating point rounding bugs in wxPropertyGrid (Artur Wieczorek).
wxGTK:
- Fix infinite sizing loop with GTK3 when using wxScrolled with a non-default
target window.
wxMSW:
- Fix compilation with C++Builder XE compiler (Nichka).

View File

@@ -81,6 +81,14 @@ void wxScrollHelper::AdjustScrollbars()
{
int vw, vh;
m_targetWindow->GetVirtualSize(&vw, &vh);
#ifdef __WXGTK3__
if (m_targetWindow != m_win)
{
// setting wxPizza preferred size keeps GtkScrolledWindow from causing
// an infinite sizing loop
gtk_widget_set_size_request(m_win->m_wxwindow, vw, vh);
}
#endif
int w, h;
const wxSize availSize = GetSizeAvailableForScrollTarget(