corrected drawing of the bitmaps for the disabled menu items (replaces patch 1632891, closes bug 1632888)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,6 +98,8 @@ All:
|
|||||||
wxMSW
|
wxMSW
|
||||||
|
|
||||||
- Fix lack of spin control update event when control lost focus
|
- Fix lack of spin control update event when control lost focus
|
||||||
|
- Corrected drawing of bitmaps for disabled menu items
|
||||||
|
|
||||||
|
|
||||||
2.8.1
|
2.8.1
|
||||||
-----
|
-----
|
||||||
|
@@ -421,9 +421,20 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc,
|
|||||||
|
|
||||||
if ( !bmp.Ok() )
|
if ( !bmp.Ok() )
|
||||||
{
|
{
|
||||||
// for not checkable bitmaps we should always use unchecked one because
|
// for not checkable bitmaps we should always use unchecked one
|
||||||
// their checked bitmap is not set
|
// because their checked bitmap is not set
|
||||||
bmp = GetBitmap(!IsCheckable() || (st & wxODChecked));
|
bmp = GetBitmap(!IsCheckable() || (st & wxODChecked));
|
||||||
|
|
||||||
|
#if wxUSE_IMAGE
|
||||||
|
if ( bmp.Ok() && st & wxODDisabled )
|
||||||
|
{
|
||||||
|
// we need to grey out the bitmap as we don't have any specific
|
||||||
|
// disabled bitmap
|
||||||
|
wxImage imgGrey = bmp.ConvertToImage().ConvertToGreyscale();
|
||||||
|
if ( imgGrey.Ok() )
|
||||||
|
bmp = wxBitmap(imgGrey);
|
||||||
|
}
|
||||||
|
#endif // wxUSE_IMAGE
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bmp.Ok() )
|
if ( bmp.Ok() )
|
||||||
|
Reference in New Issue
Block a user