Add wxBitmapBundle::GetPreferredLogicalSizeFor()
We often need the logical bitmap size when using it in size computations involving window size, so add a function returning it directly to wxBitmapBundle, similarly to wxBitmap::GetLogicalSize(), to avoid using FromPhys() everywhere. Also rename the existing wxBitmapBundle::GetPreferredSizeFor() to GetPreferredBitmapSizeFor() to make it more clear that this is similar to wxBitmap::GetSize() and so returns the size in physical units. Closes #22056.
This commit is contained in:
committed by
Vadim Zeitlin
parent
dd185a0b27
commit
b2629a97e5
@@ -520,7 +520,7 @@ void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
|
||||
return m_sizeDef;
|
||||
}
|
||||
|
||||
wxSize GetPreferredSizeAtScale(double scale) const wxOVERRIDE
|
||||
wxSize GetPreferredBitmapSizeAtScale(double scale) const wxOVERRIDE
|
||||
{
|
||||
// We just scale the bitmap to fit the requested size, so
|
||||
// we don't really have any preferences.
|
||||
|
||||
Reference in New Issue
Block a user