X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/29dfc56bf45e8ca73182fd1fee9d43c5dfedf6c1..b5c3e56ddc42b95b94a0eb79e3232e188ef00737:/src/html/helpfrm.cpp diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 488c31c45b..ac2b31819d 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -376,7 +376,9 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, m_ContentsBox->AssignImageList(ContentsImageList); - topsizer->Add(m_ContentsBox, 1, wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT, 2); + topsizer->Add(m_ContentsBox, 1, + wxEXPAND | wxLEFT | wxBOTTOM | wxRIGHT | wxADJUST_MINSIZE, + 2); m_NavigNotebook->AddPage(dummy, _("Contents")); m_ContentsPage = notebook_page++; @@ -417,7 +419,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, topsizer->Add(btsizer, 0, wxALIGN_RIGHT | wxLEFT | wxRIGHT | wxBOTTOM, 10); topsizer->Add(m_IndexCountInfo, 0, wxEXPAND | wxLEFT | wxRIGHT, 2); - topsizer->Add(m_IndexList, 1, wxEXPAND | wxALL, 2); + topsizer->Add(m_IndexList, 1, wxEXPAND | wxALL | wxADJUST_MINSIZE, 2); m_NavigNotebook->AddPage(dummy, _("Index")); m_IndexPage = notebook_page++; @@ -453,7 +455,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, sizer->Add(m_SearchCaseSensitive, 0, wxLEFT | wxRIGHT, 10); sizer->Add(m_SearchWholeWords, 0, wxLEFT | wxRIGHT, 10); sizer->Add(m_SearchButton, 0, wxALL | wxALIGN_RIGHT, 8); - sizer->Add(m_SearchList, 1, wxALL | wxEXPAND, 2); + sizer->Add(m_SearchList, 1, wxALL | wxEXPAND | wxADJUST_MINSIZE, 2); m_NavigNotebook->AddPage(dummy, _("Search")); m_SearchPage = notebook_page; @@ -465,11 +467,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, if ( navigSizer ) { - // We don't really want to set the nav panel min size to - // the current overall window size (which may be large). - // But leaving this code commented in case there's - // some variation that makes sense. -// navigSizer->SetSizeHints(m_NavigPan); + navigSizer->SetSizeHints(m_NavigPan); m_NavigPan->Layout(); } @@ -492,6 +490,13 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, } } + // Reduce flicker by updating the splitter pane sizes before the + // frame is shown + wxSizeEvent sizeEvent(GetSize(), GetId()); + ProcessEvent(sizeEvent); + + m_Splitter->UpdateSize(); + return TRUE; }