From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Fri, 31 Dec 2010 17:38:35 +0000 (+0000)
Subject: Show wxART_BUTTON icons in art provider sample resource browser.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7b8983996ebda21750310495de29cc9d0c4b4efc?ds=inline

Show wxART_BUTTON icons in art provider sample resource browser.

The button icons have a different size from all the other clients in wxGTK so
it may be interesting to see them in the sample, add wxART_BUTTON to the list
of art clients that can be chosen in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/samples/artprov/artbrows.cpp b/samples/artprov/artbrows.cpp
index b4a6f622c1..697aa57168 100644
--- a/samples/artprov/artbrows.cpp
+++ b/samples/artprov/artbrows.cpp
@@ -50,12 +50,13 @@
 static void FillClients(wxChoice *choice)
 {
     ART_CLIENT(wxART_OTHER)
+    ART_CLIENT(wxART_BUTTON)
     ART_CLIENT(wxART_TOOLBAR)
     ART_CLIENT(wxART_MENU)
     ART_CLIENT(wxART_FRAME_ICON)
     ART_CLIENT(wxART_CMN_DIALOG)
     ART_CLIENT(wxART_HELP_BROWSER)
-    ART_CLIENT(wxART_MESSAGE_BOX)
+    ART_CLIENT(wxART_MESSAGE_BOX) // Keep this last, it's the initial shown one
 }
 
 static void FillBitmaps(wxImageList *images, wxListCtrl *list,
@@ -164,7 +165,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
 
     SetSizerAndFit(sizer);
 
-    choice->SetSelection(6/*wxART_MESSAGE_BOX*/);
+    choice->SetSelection(choice->GetCount() - 1);
     SetArtClient(wxART_MESSAGE_BOX);
 }