Applied patch for ArtProvider.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2005-03-12 10:33:00 +00:00
parent ab5ea030d8
commit e53a95bcb1
8 changed files with 100 additions and 48 deletions

View File

@@ -136,7 +136,7 @@ GtkIconSize wxArtClientToIconSize(const wxArtClient& client)
else if (client == wxART_BUTTON)
return GTK_ICON_SIZE_BUTTON;
else
return GTK_ICON_SIZE_BUTTON; // this is arbitrary
return GTK_ICON_SIZE_INVALID; // this is arbitrary
}
static GtkIconSize FindClosestIconSize(const wxSize& size)
@@ -245,6 +245,10 @@ wxBitmap wxGTK2ArtProvider::CreateBitmap(const wxArtID& id,
wxArtClientToIconSize(client) :
FindClosestIconSize(size);
// we must have some size, this is arbitrary
if (stocksize == GTK_ICON_SIZE_INVALID)
stocksize = GTK_ICON_SIZE_BUTTON;
// allow passing GTK+ stock IDs to wxArtProvider:
if (!stockid)
stockid = id.ToAscii();