- if (m_buttonBitmapDisabled.Ok())
- insensPixmap = (Pixmap) m_buttonBitmapDisabled.GetLabelPixmap(m_mainWidget);
+ if (m_bmpDisabledOriginal.Ok())
+ {
+ if (m_bmpDisabledOriginal.GetMask())
+ {
+ int backgroundPixel;
+ XtVaGetValues((Widget) m_mainWidget,
+ XmNbackground, &backgroundPixel,
+ NULL);
+
+ wxColour col;
+ col.SetPixel(backgroundPixel);
+
+ wxBitmap newBitmap =
+ wxCreateMaskedBitmap(m_bmpDisabledOriginal, col);
+ m_bmpDisabled = newBitmap;
+
+ insensPixmap = (Pixmap) m_bmpDisabled.GetDrawable();
+ }
+ else
+ insensPixmap = (Pixmap) m_bitmapCache.GetInsensPixmap(m_mainWidget);
+ }