fix build

This commit is contained in:
yw4z
2026-10-09 13:33:28 +03:00
parent 1b310c1a6d
commit b83e4d2890
2 changed files with 7 additions and 9 deletions
+4 -7
View File
@@ -8,7 +8,6 @@
#include <wx/gdicmn.h>
#include <wx/panel.h>
#include <wx/stattext.h>
#include "slic3r/GUI/wxExtensions.hpp"
#include <cmath>
#include <wx/event.h>
#include <vector>
@@ -816,12 +815,10 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
if (is_multi_extruder) {
if (!ctrl->m_bmp_multi_extruder.bmp().IsOk())
ctrl->m_bmp_multi_extruder = ScalableBitmap(ctrl, "multi_extruder");
const wxBitmap& bmp = ctrl->m_bmp_multi_extruder.bmp();
// use logical size. GetWidth() returns physical pixels on macOS retina which pushes icon outside of control
const wxSize bmp_sz = get_bitmap_size(bmp);
const wxCoord icon_x = std::max(0, h_pos - bmp_sz.GetWidth() - ctrl->m_h_gap);
const wxCoord icon_y = v_pos + lround((height - bmp_sz.GetHeight()) / 2);
// draw directly to keep h_pos unchanged and avoid overwriting undo icon rects
const wxBitmap& bmp = ctrl->m_bmp_multi_extruder.bmp();
const wxSize bmp_sz = get_bitmap_size(bmp); // Logical size. GetWidth() returns physical pixels on macOS retina which pushes icon outside of control
const wxCoord icon_x = std::max(0, h_pos - bmp_sz.GetWidth() - ctrl->m_h_gap);
const wxCoord icon_y = v_pos + lround((height - bmp_sz.GetHeight()) / 2);
dc.DrawBitmap(bmp, icon_x, icon_y, true);
}
+3 -2
View File
@@ -20,6 +20,8 @@
#include "libslic3r/Config.hpp"
#include "slic3r/GUI/wxExtensions.hpp"
#include "OptionsGroup.hpp"
class wxColour;
@@ -51,8 +53,7 @@ class OG_CustomCtrl :public wxPanel
wxSize m_bmp_mode_sz;
wxSize m_bmp_blinking_sz;
// ORCA multi extruder icon drawn on left margin of variant options. created lazily on first use
ScalableBitmap m_bmp_multi_extruder;
ScalableBitmap m_bmp_multi_extruder; // ORCA multi extruder icon drawn on left margin for variant options
int m_max_win_width{0};