From 05f67d14f6d1853739a38dd05d68a8553bb99a75 Mon Sep 17 00:00:00 2001 From: "xin.zhang" Date: Fri, 17 Jan 2025 18:24:06 +0800 Subject: [PATCH] FIX: update the bitmap by dpi jira: [STUDIO-9952] Change-Id: I88d91146c83d11f7dc87b4dd5698087a342646d4 --- src/slic3r/GUI/SelectMachine.cpp | 7 ++++++- src/slic3r/GUI/SelectMachine.hpp | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 4ff76f99f..59ff73246 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -3539,6 +3539,11 @@ void SelectMachineDialog::on_dpi_changed(const wxRect &suggested_rect) material1.second->item->msw_rescale(); } + for(auto opt : m_checkbox_list) + { + opt.second->msw_rescale(); + } + Fit(); Refresh(); } @@ -4662,7 +4667,7 @@ void PrintOption::doRender(wxDC &dc) auto size = GetSize(); dc.SetPen(wxPen(*wxTRANSPARENT_PEN)); dc.SetBrush(GetBackgroundColour()); - dc.DrawRoundedRectangle(0, 0, size.x, size.y, 3); + dc.DrawRoundedRectangle(0, 0, size.x, size.y, FromDIP(3)); } void PrintOption::setValue(std::string value) diff --git a/src/slic3r/GUI/SelectMachine.hpp b/src/slic3r/GUI/SelectMachine.hpp index 0aca7357e..1f8eca567 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -198,6 +198,9 @@ public: Refresh(); }; std::string getValue(); + +public: + void msw_rescale() { m_selected_bk.msw_rescale(); Refresh(); }; }; class PrintOption : public wxPanel @@ -208,6 +211,7 @@ public: void OnPaint(wxPaintEvent &event); void render(wxDC &dc); void doRender(wxDC &dc); + void msw_rescale() { m_printoption_item->msw_rescale(); }; std::string m_param; std::vector m_ops;