From 1dfab6bb1020a469bb55ee9927032f0f31cce426 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 22 Aug 2004 17:09:17 +0000 Subject: [PATCH] wxHtmlHelpFrame's tree control uses 16x16 pixels, explicitly request this size git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/helpfrm.cpp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index fca7231c10..244ee38b8b 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -298,9 +298,15 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, m_hfStyle = style; wxImageList *ContentsImageList = new wxImageList(16, 16); - ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_BOOK, wxART_HELP_BROWSER)); - ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_FOLDER, wxART_HELP_BROWSER)); - ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_PAGE, wxART_HELP_BROWSER)); + ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_BOOK, + wxART_HELP_BROWSER, + wxSize(16, 16))); + ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_FOLDER, + wxART_HELP_BROWSER, + wxSize(16, 16))); + ContentsImageList->Add(wxArtProvider::GetIcon(wxART_HELP_PAGE, + wxART_HELP_BROWSER, + wxSize(16, 16))); // Do the config in two steps. We read the HtmlWindow customization after we // create the window. @@ -1206,9 +1212,9 @@ public: wxBoxSizer *sizer2 = new wxBoxSizer(wxHORIZONTAL); wxButton *ok; - sizer2->Add(ok = new wxButton(this, wxID_OK, _("OK")), 0, wxALL, 10); + sizer2->Add(ok = new wxButton(this, wxID_OK, wxSTOCK_OK), 0, wxALL, 10); ok->SetDefault(); - sizer2->Add(new wxButton(this, wxID_CANCEL, _("Cancel")), 0, wxALL, 10); + sizer2->Add(new wxButton(this, wxID_CANCEL, wxSTOCK_CANCEL), 0, wxALL, 10); topsizer->Add(sizer2, 0, wxALIGN_RIGHT); SetSizer(topsizer); @@ -1658,6 +1664,19 @@ void wxHtmlHelpFrame::OnIndexFind(wxCommandEvent& event) } else break; } + + // finally, it the item we just added is itself a parent for + // other items, show them as well, because they are refinements + // of the displayed index entry (i.e. it is implicitly contained + // in them: "foo" with parent "bar" reads as "bar, foo"): + short int level = index[i].items[0]->level; + i++; + while (i < cnt && index[i].items[0]->level > level) + { + m_IndexList->Append(index[i].name, (char*)(&index[i])); + i++; + } + i--; } } -- 2.47.2