- if (m_buttonBitmapDisabled.Ok())
- insensPixmap = (Pixmap) m_buttonBitmapDisabled.GetLabelPixmap(m_mainWidget);
+ if (m_bitmapsOriginal[State_Disabled].IsOk())
+ {
+ if (m_bitmapsOriginal[State_Disabled].GetMask())
+ {
+ WXPixel backgroundPixel;
+ XtVaGetValues((Widget) m_mainWidget,
+ XmNbackground, &backgroundPixel,
+ NULL);
+
+ wxColour col;
+ col.SetPixel(backgroundPixel);
+
+ wxBitmap newBitmap =
+ wxCreateMaskedBitmap(m_bitmapsOriginal[State_Disabled], col);
+ m_bitmaps[State_Disabled] = newBitmap;
+
+ insensPixmap = (Pixmap) m_bitmaps[State_Disabled].GetDrawable();
+ }
+ else
+ insensPixmap = (Pixmap) m_bitmapCache.GetInsensPixmap(m_mainWidget);
+ }