Use disabled version of normal bitmap for disabled one in wxMSW::wxButton.
Initialize the disabled button bitmap with a greyed out version of the normal one instead of using the same normal bitmap for it. This is more consistent with the other ports and makes more sense. Closes #13070. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
38e4bfde17
commit
b78a53aca0
@ -157,6 +157,7 @@ public:
|
||||
wxODButtonImageData(wxButton *btn, const wxBitmap& bitmap)
|
||||
{
|
||||
SetBitmap(bitmap, wxButton::State_Normal);
|
||||
SetBitmap(bitmap.ConvertToDisabled(), wxButton::State_Disabled);
|
||||
|
||||
m_dir = wxLEFT;
|
||||
|
||||
@ -225,10 +226,11 @@ public:
|
||||
wxButton::State_Max),
|
||||
m_hwndBtn(GetHwndOf(btn))
|
||||
{
|
||||
// initialize all bitmaps to normal state
|
||||
// initialize all bitmaps except for the disabled one to normal state
|
||||
for ( int n = 0; n < wxButton::State_Max; n++ )
|
||||
{
|
||||
m_iml.Add(bitmap);
|
||||
m_iml.Add(n == wxButton::State_Disabled ? bitmap.ConvertToDisabled()
|
||||
: bitmap);
|
||||
}
|
||||
|
||||
m_data.himl = GetHimagelistOf(&m_iml);
|
||||
|
Loading…
Reference in New Issue
Block a user