Make wxBitmap::ConvertToDisabled() work correctly for scaled bitmaps

Preserve the scale factor after conversion.

Closes #17307.
This commit is contained in:
Vadim Zeitlin 2016-02-23 00:13:37 +01:00
parent 2fa4a0be4e
commit fb5ff50eda

View File

@ -302,7 +302,8 @@ wxBitmap::
#endif
ConvertToDisabled(unsigned char brightness) const
{
return ConvertToImage().ConvertToDisabled(brightness);
const wxImage imgDisabled = ConvertToImage().ConvertToDisabled(brightness);
return wxBitmap(imgDisabled, -1, GetScaleFactor());
}
#endif // wxUSE_IMAGE