]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tglbtn.cpp
floating pane now respects IsFixed pane status; indirect fix for #4044
[wxWidgets.git] / src / gtk / tglbtn.cpp
index 50b319394fe82fe6247d269ab2acb3d3a42d2b8a..b98f15130567a668edf3e0a268e7d0f0986b2d03 100644 (file)
@@ -126,15 +126,13 @@ void wxBitmapToggleButton::OnSetBitmap()
     GtkWidget* image = ((GtkBin*)m_widget)->child;
     if (image == NULL)
     {
     GtkWidget* image = ((GtkBin*)m_widget)->child;
     if (image == NULL)
     {
-        // initial bitmap
-        image = gtk_image_new_from_pixbuf(m_bitmap.GetPixbuf());
+        image = gtk_image_new();
         gtk_widget_show(image);
         gtk_container_add((GtkContainer*)m_widget, image);
     }
         gtk_widget_show(image);
         gtk_container_add((GtkContainer*)m_widget, image);
     }
-    else
-    {   // subsequent bitmaps
-        gtk_image_set_from_pixbuf((GtkImage*)image, m_bitmap.GetPixbuf());
-    }
+    // always use pixbuf, because pixmap mask does not
+    // work with disabled images in some themes
+    gtk_image_set_from_pixbuf((GtkImage*)image, m_bitmap.GetPixbuf());
 }
 
 bool wxBitmapToggleButton::Enable(bool enable /*=true*/)
 }
 
 bool wxBitmapToggleButton::Enable(bool enable /*=true*/)