]> git.saurik.com Git - wxWidgets.git/commitdiff
use smaller icons, it looks better (patch 1695225)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Apr 2007 13:25:34 +0000 (13:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Apr 2007 13:25:34 +0000 (13:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/widgets/widgets.cpp
samples/widgets/widgets.h

index fde4f53272f909bfbd6681742eb2ff4b139416a9..31d4763ccebe9b5c1e492d98ff5774b547a59272 100644 (file)
@@ -458,9 +458,10 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
 void WidgetsFrame::InitBook()
 {
 #if USE_ICONS_IN_BOOK
-    wxImageList *imageList = new wxImageList(32, 32);
+    wxImageList *imageList = new wxImageList(ICON_SIZE, ICON_SIZE);
 
-    imageList->Add(wxBitmap(sample_xpm));
+    wxImage img(sample_xpm);
+    imageList->Add(wxBitmap(img.Scale(ICON_SIZE, ICON_SIZE)));
 #else
     wxImageList *imageList = NULL;
 #endif
@@ -929,7 +930,7 @@ WidgetsPage::WidgetsPage(WidgetsBookCtrl *book,
                      wxTAB_TRAVERSAL)
 {
 #if USE_ICONS_IN_BOOK
-    imaglist->Add(wxBitmap(icon));
+    imaglist->Add(wxBitmap(wxImage(icon).Scale(ICON_SIZE, ICON_SIZE)));
 #else
     wxUnusedVar(imaglist);
     wxUnusedVar(icon);
index 7f077cfb5404543d1a5a33e0f47e514412914c1f..e717e5ad08dc0d9d14087300dd2aa8a0d65a5a2d 100644 (file)
@@ -40,6 +40,7 @@
     #define USE_ICONS_IN_BOOK 0
 #else
     #define USE_ICONS_IN_BOOK 1
+    #define ICON_SIZE         16
 #endif
 
 class WXDLLEXPORT wxCheckBox;