Disabled bitmaps are not rendered properly in this configuration, they
look the same as normal ones. This is hardly ideal, but such
degradations are to be expected when disabling something as widely used
as wxImage.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72677
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxODButtonImageData(wxAnyButton *btn, const wxBitmap& bitmap)
{
SetBitmap(bitmap, wxAnyButton::State_Normal);
+#if wxUSE_IMAGE
SetBitmap(bitmap.ConvertToDisabled(), wxAnyButton::State_Disabled);
-
+#endif
m_dir = wxLEFT;
// we use margins when we have both bitmap and text, but when we have
// initialize all bitmaps except for the disabled one to normal state
for ( int n = 0; n < wxAnyButton::State_Max; n++ )
{
+#if wxUSE_IMAGE
m_iml.Add(n == wxAnyButton::State_Disabled ? bitmap.ConvertToDisabled()
: bitmap);
+#else
+ m_iml.Add(bitmap);
+#endif
}
m_data.himl = GetHimagelistOf(&m_iml);