mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-17 09:23:05 +00:00
Fix BitmapComboBox for wxWidgets 3.3 (wxBitmap -> wxBitmapBundle)
In wxWidgets 3.3, wxBitmapComboBoxBase::OnAddBitmap changed its parameter from const wxBitmap& to const wxBitmapBundle&, and m_bitmaps was replaced by m_bitmapbundles. Update OnAddBitmap signature and OnDrawItem to use wxBitmapBundle, extracting wxBitmap via GetBitmap(GetDefaultSize()) where needed.
This commit is contained in:
@@ -91,8 +91,9 @@ BitmapComboBox::~BitmapComboBox()
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
bool BitmapComboBox::OnAddBitmap(const wxBitmap& bitmap)
|
||||
bool BitmapComboBox::OnAddBitmap(const wxBitmapBundle& bundle)
|
||||
{
|
||||
wxBitmap bitmap = bundle.GetBitmap(bundle.GetDefaultSize());
|
||||
if (bitmap.IsOk())
|
||||
{
|
||||
// we should use scaled! size values of bitmap
|
||||
@@ -131,7 +132,8 @@ void BitmapComboBox::OnDrawItem(wxDC& dc,
|
||||
int item,
|
||||
int flags) const
|
||||
{
|
||||
const wxBitmap& bmp = *(static_cast<wxBitmap*>(m_bitmaps[item]));
|
||||
const wxBitmapBundle& bundle = m_bitmapbundles[item];
|
||||
wxBitmap bmp = bundle.GetBitmap(bundle.GetDefaultSize());
|
||||
if (bmp.IsOk())
|
||||
{
|
||||
// we should use scaled! size values of bitmap
|
||||
|
||||
Reference in New Issue
Block a user