From 389a7ff3a6b530152dd0c12721f08cf6fa8e6c1f 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 (cherry picked from commit 05f67d14f6d1853739a38dd05d68a8553bb99a75) --- 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 abd1f6a0e0..cee7e89dbe 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -3527,6 +3527,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(); } @@ -4650,7 +4655,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 56c8e48348..33d5b6df1a 100644 --- a/src/slic3r/GUI/SelectMachine.hpp +++ b/src/slic3r/GUI/SelectMachine.hpp @@ -201,6 +201,9 @@ public: Refresh(); }; std::string getValue(); + +public: + void msw_rescale() { m_selected_bk.msw_rescale(); Refresh(); }; }; class PrintOption : public wxPanel @@ -211,6 +214,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;