Take into account scale factor of images added to wxImageList
Closes #19114.
This commit is contained in:
parent
767de514c1
commit
eb52e86553
1 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ wxBitmap GetImageListBitmap(const wxBitmap& bitmap, bool useMask, const wxSize&
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
wxImage img = bmp.ConvertToImage();
|
wxImage img = bmp.ConvertToImage();
|
||||||
img.ClearAlpha();
|
img.ClearAlpha();
|
||||||
bmp = img;
|
bmp = wxBitmap(img, -1, bmp.GetScaleFactor());
|
||||||
#endif // wxUSE_IMAGE
|
#endif // wxUSE_IMAGE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -81,7 +81,7 @@ wxBitmap GetImageListBitmap(const wxBitmap& bitmap, bool useMask, const wxSize&
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
wxImage img = bmp.ConvertToImage();
|
wxImage img = bmp.ConvertToImage();
|
||||||
img.ConvertAlphaToMask();
|
img.ConvertAlphaToMask();
|
||||||
bmp = img;
|
bmp = wxBitmap(img, -1, bmp.GetScaleFactor());
|
||||||
#endif // wxUSE_IMAGE
|
#endif // wxUSE_IMAGE
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -107,7 +107,7 @@ wxBitmap GetImageListBitmap(const wxBitmap& bitmap, bool useMask, const wxSize&
|
||||||
#if wxUSE_IMAGE
|
#if wxUSE_IMAGE
|
||||||
wxImage img = bmp.ConvertToImage();
|
wxImage img = bmp.ConvertToImage();
|
||||||
img.InitAlpha();
|
img.InitAlpha();
|
||||||
bmp = img;
|
bmp = wxBitmap(img, -1, bmp.GetScaleFactor());
|
||||||
#else
|
#else
|
||||||
bmp.SetMask(NULL);
|
bmp.SetMask(NULL);
|
||||||
#endif // wxUSE_IMAGE
|
#endif // wxUSE_IMAGE
|
||||||
|
|
@ -117,7 +117,7 @@ wxBitmap GetImageListBitmap(const wxBitmap& bitmap, bool useMask, const wxSize&
|
||||||
|
|
||||||
// Ensure image size is the same as the size of the images on the image list.
|
// Ensure image size is the same as the size of the images on the image list.
|
||||||
wxBitmap bmpResized;
|
wxBitmap bmpResized;
|
||||||
const wxSize sz = bmp.GetSize();
|
const wxSize sz = bmp.GetScaledSize();
|
||||||
if ( sz.x == imgSize.x && sz.y == imgSize.y )
|
if ( sz.x == imgSize.x && sz.y == imgSize.y )
|
||||||
{
|
{
|
||||||
bmpResized = bmp;
|
bmpResized = bmp;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue