From 35d1efe6575c7d62fe35cc318410a8e20bb69846 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 22 Jun 2007 12:25:11 +0000 Subject: [PATCH] Always use (or create on-the-fly) pixbuf representation in wxBitmapButtom, fixes [ 1739413 ] Transparency, wxBitmapButton, GTK, disabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/bmpbuttn.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index 656db887dc..bd7ccfc6be 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -208,19 +208,12 @@ void wxBitmapButton::OnSetBitmap() if (!the_one.Ok()) the_one = m_bmpNormal; if (!the_one.Ok()) return; - GdkBitmap *mask = (GdkBitmap *) NULL; - if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap(); - GtkWidget *child = GTK_BIN(m_widget)->child; if (child == NULL) { // initial bitmap - GtkWidget *pixmap; - - if (the_one.HasPixbuf()) - pixmap = gtk_image_new_from_pixbuf(the_one.GetPixbuf()); - else - pixmap = gtk_image_new_from_pixmap(the_one.GetPixmap(), mask); + GtkWidget *pixmap = + gtk_image_new_from_pixbuf(the_one.GetPixbuf()); gtk_widget_show(pixmap); gtk_container_add(GTK_CONTAINER(m_widget), pixmap); @@ -228,10 +221,7 @@ void wxBitmapButton::OnSetBitmap() else { // subsequent bitmaps GtkImage *pixmap = GTK_IMAGE(child); - if (the_one.HasPixbuf()) - gtk_image_set_from_pixbuf(pixmap, the_one.GetPixbuf()); - else - gtk_image_set_from_pixmap(pixmap, the_one.GetPixmap(), mask); + gtk_image_set_from_pixbuf(pixmap, the_one.GetPixbuf()); } }