]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed size calculation
authorJulian Smart <julian@anthemion.co.uk>
Tue, 13 Mar 2012 08:42:03 +0000 (08:42 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 13 Mar 2012 08:42:03 +0000 (08:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70891 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/ribbon/panel.cpp

index f8f26f1e890258d0632f99a0fc8899f76ef77d1d..91c014e4144f17d85db0e8d53b9535227a9effa9 100644 (file)
@@ -321,7 +321,8 @@ wxSize wxRibbonPanel::GetBestSizeForParentSize(const wxSize& parentSize) const
         if (control)
         {
             wxClientDC temp_dc((wxRibbonPanel*) this);
         if (control)
         {
             wxClientDC temp_dc((wxRibbonPanel*) this);
-            wxSize childSize = control->GetBestSizeForParentSize(parentSize);
+            wxSize clientParentSize = m_art->GetPanelClientSize(temp_dc, this, parentSize, NULL);
+            wxSize childSize = control->GetBestSizeForParentSize(clientParentSize);
             wxSize overallSize = m_art->GetPanelSize(temp_dc, this, childSize, NULL);
             return overallSize;
         }
             wxSize overallSize = m_art->GetPanelSize(temp_dc, this, childSize, NULL);
             return overallSize;
         }