FIX: update the bitmap by dpi

jira: [STUDIO-9952]
Change-Id: I88d91146c83d11f7dc87b4dd5698087a342646d4
(cherry picked from commit 05f67d14f6d1853739a38dd05d68a8553bb99a75)
This commit is contained in:
xin.zhang
2025-01-17 18:24:06 +08:00
committed by Noisyfox
parent 34f4300f4e
commit 389a7ff3a6
2 changed files with 10 additions and 1 deletions

View File

@@ -3527,6 +3527,11 @@ void SelectMachineDialog::on_dpi_changed(const wxRect &suggested_rect)
material1.second->item->msw_rescale(); material1.second->item->msw_rescale();
} }
for(auto opt : m_checkbox_list)
{
opt.second->msw_rescale();
}
Fit(); Fit();
Refresh(); Refresh();
} }
@@ -4650,7 +4655,7 @@ void PrintOption::doRender(wxDC &dc)
auto size = GetSize(); auto size = GetSize();
dc.SetPen(wxPen(*wxTRANSPARENT_PEN)); dc.SetPen(wxPen(*wxTRANSPARENT_PEN));
dc.SetBrush(GetBackgroundColour()); 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) void PrintOption::setValue(std::string value)

View File

@@ -201,6 +201,9 @@ public:
Refresh(); Refresh();
}; };
std::string getValue(); std::string getValue();
public:
void msw_rescale() { m_selected_bk.msw_rescale(); Refresh(); };
}; };
class PrintOption : public wxPanel class PrintOption : public wxPanel
@@ -211,6 +214,7 @@ public:
void OnPaint(wxPaintEvent &event); void OnPaint(wxPaintEvent &event);
void render(wxDC &dc); void render(wxDC &dc);
void doRender(wxDC &dc); void doRender(wxDC &dc);
void msw_rescale() { m_printoption_item->msw_rescale(); };
std::string m_param; std::string m_param;
std::vector<POItem> m_ops; std::vector<POItem> m_ops;