- insensPixmap = (Pixmap) ((wxBitmap&)bitmap).GetInsensPixmap(m_mainWidget);
-
- if (!insensPixmap || (insensPixmap == labelPixmap)) // <- the Get...Pixmap()-functions return the same pixmap!
+ pixmap = (Pixmap) m_buttonBitmap.GetLabelPixmap(m_mainWidget);
+
+ if (m_buttonBitmapDisabledOriginal.Ok())
+ {
+ if (m_buttonBitmapDisabledOriginal.GetMask())
+ {
+ int backgroundPixel;
+ XtVaGetValues((Widget) m_mainWidget, XmNbackground, &backgroundPixel,
+ NULL);
+
+ wxColour col;
+ col.SetPixel(backgroundPixel);
+
+ wxBitmap newBitmap = wxCreateMaskedBitmap(m_buttonBitmapDisabledOriginal, col);
+ m_buttonBitmapDisabled = newBitmap;
+
+ insensPixmap = (Pixmap) m_buttonBitmapDisabled.GetPixmap();
+ }
+ else
+ insensPixmap = (Pixmap) m_buttonBitmap.GetInsensPixmap(m_mainWidget);
+ }
+ else
+ insensPixmap = (Pixmap) m_buttonBitmap.GetInsensPixmap(m_mainWidget);
+
+ // Now make the bitmap representing the armed state
+ if (m_buttonBitmapSelectedOriginal.Ok())