Fix confusion between width and height in wxArtProvider
Amazingly, the fact that the bitmap height was compared with the required width went unnoticed even though it was there since this code was added back ine53a95bcb1(Applied patch for ArtProvider., 2005-03-12) and even survived migration to a different file in2b7e668221(Move bitmap resizing from wxDefaultArtProvider to base class, 2022-02-05). That this has never been a problem seems to conclusively prove that non-square icons simply don't exist, but still fix the comparisons just to be tidy.
This commit is contained in:
@@ -309,7 +309,7 @@ wxArtProvider::RescaleOrResizeIfNeeded(wxBitmap& bmp, const wxSize& sizeNeeded)
|
||||
return;
|
||||
|
||||
#if wxUSE_IMAGE
|
||||
if ((bmp_h <= sizeNeeded.x) && (bmp_w <= sizeNeeded.y))
|
||||
if ((bmp_w <= sizeNeeded.x) && (bmp_h <= sizeNeeded.y))
|
||||
{
|
||||
// the caller wants default size, which is larger than
|
||||
// the image we have; to avoid degrading it visually by
|
||||
|
||||
Reference in New Issue
Block a user