X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50f65637a84135808d0fa246b7f53c6d66889a74..5875d39c9ba19f518e691792524f2fd03261c825:/src/gtk1/artgtk.cpp diff --git a/src/gtk1/artgtk.cpp b/src/gtk1/artgtk.cpp index 209c58e674..0956482251 100644 --- a/src/gtk1/artgtk.cpp +++ b/src/gtk1/artgtk.cpp @@ -24,6 +24,7 @@ #include "wx/artprov.h" #include "wx/module.h" +#include "wx/gtk/private.h" #include @@ -110,6 +111,7 @@ static const char *wxArtIDToStock(const wxArtID& id) ART(wxART_CUT, GTK_STOCK_CUT) ART(wxART_PASTE, GTK_STOCK_PASTE) ART(wxART_DELETE, GTK_STOCK_DELETE) + ART(wxART_NEW, GTK_STOCK_NEW) ART(wxART_UNDO, GTK_STOCK_UNDO) ART(wxART_REDO, GTK_STOCK_REDO) @@ -125,7 +127,7 @@ static const char *wxArtIDToStock(const wxArtID& id) #undef ART } -static GtkIconSize wxArtClientToIconSize(const wxArtClient& client) +GtkIconSize wxArtClientToIconSize(const wxArtClient& client) { if (client == wxART_TOOLBAR) return GTK_ICON_SIZE_LARGE_TOOLBAR; @@ -136,7 +138,7 @@ static 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 +247,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();