Add wxBitmap::GetDIPSize() and use it in wxBitmapBundleImplArt

This fixes the problem with wrong standard bitmaps size when using high
DPI for the main monitor with wxMSW, as GetScaledSize() used here since
31f2892200 (Avoid bitmap scaling in wxArtProvider::GetBitmapBundle(),
2021-12-17) was not the right function to use there.

Closes #19331.
This commit is contained in:
Vadim Zeitlin
2022-01-06 19:17:28 +00:00
parent 03cf1f4359
commit 7c7ff3cd42
6 changed files with 37 additions and 2 deletions

View File

@@ -1385,6 +1385,11 @@ double wxBitmap::GetScaleFactor() const
return GetBitmapData()->m_scaleFactor;
}
wxSize wxBitmap::GetDIPSize() const
{
return GetSize() / GetScaleFactor();
}
double wxBitmap::GetScaledWidth() const
{
return GetWidth();