anybutton.cpp compilation fix for wxUSE_IMAGE=0.
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
This commit is contained in:
@@ -150,8 +150,9 @@ public:
|
||||
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
|
||||
@@ -222,8 +223,12 @@ public:
|
||||
// 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);
|
||||
|
Reference in New Issue
Block a user