From f6d43eda3e8bc5c17cd3c55f037abcc4a4e043be Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Mar 2005 23:36:07 +0000 Subject: [PATCH] (blind) GTK1 compilation fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/artprov.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 5ebdb6aaa2..52b8b8ab98 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -175,7 +175,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; int bmp_w = bmp.GetWidth(); int bmp_h = bmp.GetHeight(); // want default size but it's smaller, paste into transparent image - if ((reqSize == wxDefaultSize) && + if ((reqSize == wxDefaultSize) && (bmp_h < bestSize.x) && (bmp_w < bestSize.y)) { wxPoint offset((bestSize.x - bmp_w)/2, (bestSize.y - bmp_h)/2); @@ -215,12 +215,12 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; return icon; } -#ifdef __WXGTK__ +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #include extern GtkIconSize wxArtClientToIconSize(const wxArtClient& client); #endif // __WXGTK__ -/*static*/ wxSize wxArtProvider::GetSize(const wxArtClient& client, +/*static*/ wxSize wxArtProvider::GetSize(const wxArtClient& client, bool platform_dependent) { if (!platform_dependent) @@ -228,16 +228,16 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; wxArtProvidersList::compatibility_iterator node = sm_providers->GetFirst(); if (node) return node->GetData()->DoGetSize(client); - + // else return platform dependent size - } - -#ifdef __WXGTK__ + } + +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) GtkIconSize gtk_size = wxArtClientToIconSize(client); gint width, height; gtk_icon_size_lookup( gtk_size, &width, &height); return wxSize(width, height); -#else +#else // !GTK+ 2 if (client == wxART_TOOLBAR) return wxSize(32, 32); else if (client == wxART_MENU) @@ -247,8 +247,8 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; else if (client == wxART_BUTTON) return wxSize(16, 15); else - return wxSize(16, 15); // this is arbitrary -#endif + return wxSize(16, 15); // this is arbitrary +#endif // GTK+ 2/else } -- 2.45.2