]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpwnd.cpp
If there is a sizer then use it's calculated minimum in wxStaticBox::DoGetBestSize
[wxWidgets.git] / src / html / helpwnd.cpp
index 3bd5c41506cafb9574fbb70312fa6121aeb8c85a..eff2294cca743930379e41da153e8bdccc9ade26 100644 (file)
 // 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()