Allow wxBitmapBundle to specify its preferred bitmap size
Using bitmaps of preferred size avoids scaling and results in much better appearance, so add methods allowing querying the bundle about the bitmaps it supports and implement them in the various implementations. This is not actually used anywhere yet, but will be soon.
This commit is contained in:
@@ -520,6 +520,13 @@ void MyFrame::PopulateToolbar(wxToolBarBase* toolBar)
|
||||
return m_sizeDef;
|
||||
}
|
||||
|
||||
wxSize GetPreferredSizeAtScale(double scale) const wxOVERRIDE
|
||||
{
|
||||
// We just scale the bitmap to fit the requested size, so
|
||||
// we don't really have any preferences.
|
||||
return m_sizeDef*scale;
|
||||
}
|
||||
|
||||
wxBitmap GetBitmap(const wxSize& size) wxOVERRIDE
|
||||
{
|
||||
// In this simple implementation we don't bother caching
|
||||
|
Reference in New Issue
Block a user