X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69f270e0f34e15b3cdf53f6fa697fcedf78fb452..11716cbe14313011016472f56edb51c55aabe852:/src/html/helpwnd.cpp diff --git a/src/html/helpwnd.cpp b/src/html/helpwnd.cpp index 3bd5c41506..eff2294cca 100644 --- a/src/html/helpwnd.cpp +++ b/src/html/helpwnd.cpp @@ -60,6 +60,11 @@ // what is considered "small index"? #define INDEX_IS_SMALL 1000 +// minimum width for content tree and index +// (we cannot let minimum size be determined from content, else long titles +// make the help frame unusable) +const wxCoord CONTENT_TREE_INDEX_MIN_WIDTH = 150; + /* Motif defines this as a macro */ #ifdef Below #undef Below @@ -358,8 +363,7 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id, #ifdef __WXMSW__ wxBorder htmlWindowBorder = GetDefaultBorder(); - if (htmlWindowBorder == wxBORDER_SUNKEN) - htmlWindowBorder = wxBORDER_SIMPLE; + htmlWindowBorder = wxBORDER_THEME; #else wxBorder htmlWindowBorder = wxBORDER_SUNKEN; #endif @@ -1034,6 +1038,9 @@ void wxHtmlHelpWindow::CreateContents() imaged[it->level] = true; } } + + m_ContentsBox->SetMinSize(wxSize(CONTENT_TREE_INDEX_MIN_WIDTH, + m_ContentsBox->GetMinHeight())); } void wxHtmlHelpWindow::CreateIndex() @@ -1057,6 +1064,9 @@ void wxHtmlHelpWindow::CreateIndex() for (size_t i = 0; i < cnt; i++) m_IndexList->Append((*m_mergedIndex)[i].name, (char*)(&(*m_mergedIndex)[i])); + + m_IndexList->SetMinSize(wxSize(CONTENT_TREE_INDEX_MIN_WIDTH, + m_IndexList->GetMinHeight())); } void wxHtmlHelpWindow::CreateSearch()