use smaller icons, it looks better (patch 1695225)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45299 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-07 13:25:34 +00:00
parent 6daba577e9
commit 993b016d6c
2 changed files with 5 additions and 3 deletions

View File

@@ -458,9 +458,10 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
void WidgetsFrame::InitBook() void WidgetsFrame::InitBook()
{ {
#if USE_ICONS_IN_BOOK #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 #else
wxImageList *imageList = NULL; wxImageList *imageList = NULL;
#endif #endif
@@ -929,7 +930,7 @@ WidgetsPage::WidgetsPage(WidgetsBookCtrl *book,
wxTAB_TRAVERSAL) wxTAB_TRAVERSAL)
{ {
#if USE_ICONS_IN_BOOK #if USE_ICONS_IN_BOOK
imaglist->Add(wxBitmap(icon)); imaglist->Add(wxBitmap(wxImage(icon).Scale(ICON_SIZE, ICON_SIZE)));
#else #else
wxUnusedVar(imaglist); wxUnusedVar(imaglist);
wxUnusedVar(icon); wxUnusedVar(icon);

View File

@@ -40,6 +40,7 @@
#define USE_ICONS_IN_BOOK 0 #define USE_ICONS_IN_BOOK 0
#else #else
#define USE_ICONS_IN_BOOK 1 #define USE_ICONS_IN_BOOK 1
#define ICON_SIZE 16
#endif #endif
class WXDLLEXPORT wxCheckBox; class WXDLLEXPORT wxCheckBox;