X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..ab0d42f76d5594bd28fdcad35bedeb380902f3ea:/samples/widgets/notebook.cpp?ds=sidebyside diff --git a/samples/widgets/notebook.cpp b/samples/widgets/notebook.cpp index 15e02fbfce..4491785d2f 100644 --- a/samples/widgets/notebook.cpp +++ b/samples/widgets/notebook.cpp @@ -41,9 +41,10 @@ #include "wx/sizer.h" #include "wx/notebook.h" +#include "wx/artprov.h" #include "widgets.h" - +#if 1 #include "icons/notebook.xpm" // ---------------------------------------------------------------------------- @@ -153,8 +154,8 @@ protected: wxImageList *m_imageList; private: - DECLARE_EVENT_TABLE(); - DECLARE_WIDGETS_PAGE(NotebookWidgetsPage); + DECLARE_EVENT_TABLE() + DECLARE_WIDGETS_PAGE(NotebookWidgetsPage) }; // ---------------------------------------------------------------------------- @@ -279,7 +280,7 @@ NotebookWidgetsPage::NotebookWidgetsPage(wxNotebook *notebook, wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL); m_notebook = new wxNotebook(this, NotebookPage_Notebook); sizerRight->Add(m_notebook, 1, wxGROW | wxALL, 5); - sizerRight->SetMinSize(250, 0); + sizerRight->SetMinSize(150, 0); m_sizerNotebook = sizerRight; // save it to modify it later // the 3 panes panes compose the window @@ -320,10 +321,11 @@ void NotebookWidgetsPage::CreateImageList() { // create a dummy image list with a few icons m_imageList = new wxImageList(32, 32); - m_imageList->Add(wxTheApp->GetStdIcon(wxICON_INFORMATION)); - m_imageList->Add(wxTheApp->GetStdIcon(wxICON_QUESTION)); - m_imageList->Add(wxTheApp->GetStdIcon(wxICON_WARNING)); - m_imageList->Add(wxTheApp->GetStdIcon(wxICON_ERROR)); + wxSize size(32, 32); + m_imageList->Add(wxArtProvider::GetIcon(wxART_INFORMATION, wxART_OTHER, size)); + m_imageList->Add(wxArtProvider::GetIcon(wxART_QUESTION, wxART_OTHER, size)); + m_imageList->Add(wxArtProvider::GetIcon(wxART_WARNING, wxART_OTHER, size)); + m_imageList->Add(wxArtProvider::GetIcon(wxART_ERROR, wxART_OTHER, size)); } m_notebook->SetImageList(m_imageList); @@ -541,3 +543,4 @@ void NotebookWidgetsPage::OnPageChanged(wxNotebookEvent& event) event.Skip(); } +#endif \ No newline at end of file