mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
Revert to WxWidgets 3.1.5 (#3249)
* revert to WxWidgets 3.1.5 * update nanosvg unicode path
This commit is contained in:
parent
cc23ec6626
commit
374f78c768
95 changed files with 6841 additions and 1618 deletions
|
@ -33,15 +33,6 @@ wxIMPLEMENT_DYNAMIC_CLASS(DataViewBitmapText, wxObject)
|
|||
|
||||
IMPLEMENT_VARIANT_OBJECT(DataViewBitmapText)
|
||||
|
||||
static wxSize get_size(const wxBitmap& icon)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
return icon.GetSize();
|
||||
#else
|
||||
return icon.GetScaledSize();
|
||||
#endif
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// BitmapTextRenderer
|
||||
// ---------------------------------------------------------
|
||||
|
@ -133,7 +124,11 @@ bool BitmapTextRenderer::Render(wxRect rect, wxDC *dc, int state)
|
|||
const wxBitmap& icon = m_value.GetBitmap();
|
||||
if (icon.IsOk())
|
||||
{
|
||||
wxSize icon_sz = get_size(icon);
|
||||
#ifdef __APPLE__
|
||||
wxSize icon_sz = icon.GetScaledSize();
|
||||
#else
|
||||
wxSize icon_sz = icon.GetSize();
|
||||
#endif
|
||||
dc->DrawBitmap(icon, rect.x, rect.y + (rect.height - icon_sz.y) / 2);
|
||||
xoffset = icon_sz.x + 4;
|
||||
}
|
||||
|
@ -275,12 +270,11 @@ bool BitmapChoiceRenderer::Render(wxRect rect, wxDC* dc, int state)
|
|||
const wxBitmap& icon = m_value.GetBitmap();
|
||||
if (icon.IsOk())
|
||||
{
|
||||
wxSize icon_sz = get_size(icon);
|
||||
dc->DrawBitmap(icon, rect.x, rect.y + (rect.height - icon_sz.GetHeight()) / 2);
|
||||
// xoffset = icon_sz.GetWidth() + 4;
|
||||
dc->DrawBitmap(icon, rect.x, rect.y + (rect.height - icon.GetHeight()) / 2);
|
||||
// xoffset = icon.GetWidth() + 4;
|
||||
|
||||
if (rect.height == 0)
|
||||
rect.height = icon_sz.GetHeight();
|
||||
rect.height = icon.GetHeight();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -311,7 +305,7 @@ wxWindow* BitmapChoiceRenderer::CreateEditorCtrl(wxWindow* parent, wxRect labelR
|
|||
if (can_create_editor_ctrl && !can_create_editor_ctrl())
|
||||
return nullptr;
|
||||
|
||||
std::vector<wxBitmapBundle*> icons = get_extruder_color_icons();
|
||||
std::vector<wxBitmap*> icons = get_extruder_color_icons();
|
||||
if (icons.empty())
|
||||
return nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue