Fix determining height of monochrome HICON in wxGetHiconSize()
For monochrome icons height reported by GetObject() is doubled because icon bitmap contains both AND and XOR masks. To get actual icon height we need to divide the value by 2. Closes #19146.
This commit is contained in:
@@ -660,6 +660,12 @@ wxSize wxGetHiconSize(HICON hicon)
|
||||
size = wxSize(bm.bmWidth, bm.bmHeight);
|
||||
}
|
||||
}
|
||||
// For monochrome icon reported height is doubled
|
||||
// because it contains both AND and XOR masks.
|
||||
if ( info.hbmColor == NULL )
|
||||
{
|
||||
size.y /= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user