]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/artstd.cpp
use gtk_file_chooser_set_show_hidden() now that GTK 2.6 is required
[wxWidgets.git] / src / common / artstd.cpp
index 7cd6a7df431a9719ce8a5dd87706750bc4def856..3fa46d4d45afd7f2214f2fff5abaa341132dec71 100644 (file)
@@ -20,6 +20,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_ARTPROVIDER_STD
+
 #ifndef WX_PRECOMP
     #include "wx/image.h"
 #endif
@@ -43,7 +45,7 @@ protected:
 
 /*static*/ void wxArtProvider::InitStdProvider()
 {
-    wxArtProvider::Push(new wxDefaultArtProvider);
+    wxArtProvider::PushBack(new wxDefaultArtProvider);
 }
 
 // ----------------------------------------------------------------------------
@@ -93,6 +95,8 @@ protected:
 #include "../../art/helpicon.xpm"
 #include "../../art/tipicon.xpm"
 #include "../../art/home.xpm"
+#include "../../art/first.xpm"
+#include "../../art/last.xpm"
 #include "../../art/repview.xpm"
 #include "../../art/listview.xpm"
 #include "../../art/new_dir.xpm"
@@ -117,6 +121,9 @@ protected:
 #include "../../art/new.xpm"
 #include "../../art/undo.xpm"
 #include "../../art/redo.xpm"
+#include "../../art/plus.xpm"
+#include "../../art/minus.xpm"
+#include "../../art/close.xpm"
 #include "../../art/quit.xpm"
 #include "../../art/find.xpm"
 #include "../../art/findrepl.xpm"
@@ -148,6 +155,8 @@ wxBitmap wxDefaultArtProvider_CreateBitmap(const wxArtID& id)
     ART(wxART_GO_DOWN,                             down)
     ART(wxART_GO_TO_PARENT,                        toparent)
     ART(wxART_GO_HOME,                             home)
+    ART(wxART_GOTO_FIRST,                          first)
+    ART(wxART_GOTO_LAST,                           last)
     ART(wxART_FILE_OPEN,                           fileopen)
     ART(wxART_PRINT,                               print)
     ART(wxART_HELP,                                helpicon)
@@ -175,6 +184,9 @@ wxBitmap wxDefaultArtProvider_CreateBitmap(const wxArtID& id)
     ART(wxART_DELETE,                              delete)
     ART(wxART_UNDO,                                undo)
     ART(wxART_REDO,                                redo)
+    ART(wxART_PLUS,                                plus)
+    ART(wxART_MINUS,                               minus)
+    ART(wxART_CLOSE,                               close)
     ART(wxART_QUIT,                                quit)
     ART(wxART_FIND,                                find)
     ART(wxART_FIND_AND_REPLACE,                    findrepl)
@@ -195,7 +207,7 @@ wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id,
     wxBitmap bmp = wxDefaultArtProvider_CreateBitmap(id);
 
 #if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
-    if (bmp.Ok())
+    if (bmp.IsOk())
     {
         // fit into transparent image with desired size hint from the client
         if (reqSize == wxDefaultSize)
@@ -207,7 +219,12 @@ wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id,
                 int bmp_w = bmp.GetWidth();
                 int bmp_h = bmp.GetHeight();
 
-                if ((bmp_h < bestSize.x) && (bmp_w < bestSize.y))
+                if (bmp_w == 16 && bmp_h == 15 && bestSize == wxSize(16, 16))
+                {
+                    // Do nothing in this special but quite common case, because scaling
+                    // with only a pixel difference will look horrible.
+                }
+                else if ((bmp_h < bestSize.x) && (bmp_w < bestSize.y))
                 {
                     // the caller wants default size, which is larger than
                     // the image we have; to avoid degrading it visually by
@@ -236,3 +253,5 @@ wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id,
 
     return bmp;
 }
+
+#endif // wxUSE_ARTPROVIDER_STD