Fix size of wxImageList created by wxBitmapBundle
The size must be specified in logical, and not physical, pixels and the failure to do use the correct units results in a silent (!) failure to add any bitmaps to the wxImageList later.
This commit is contained in:
parent
73886b1bb2
commit
0588bc8820
@ -570,8 +570,11 @@ wxBitmapBundle::CreateImageList(wxWindow* win,
|
||||
// we do here. Note that this size is only used to break the tie in case
|
||||
// the same number of bundles prefer two different sizes, so it's not going
|
||||
// to matter at all in most cases.
|
||||
const wxSize
|
||||
size = GetConsensusSizeFor(win, bundles, bundles[0].GetDefaultSize());
|
||||
wxSize size = GetConsensusSizeFor(win, bundles, bundles[0].GetDefaultSize());
|
||||
|
||||
// wxImageList wants the logical size for the platforms where logical and
|
||||
// physical pixels are different.
|
||||
size /= win->GetContentScaleFactor();
|
||||
|
||||
wxImageList* const iml = new wxImageList(size.x, size.y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user