FIX: update the bitmap by dpi

jira: [STUDIO-9952]
Change-Id: I88d91146c83d11f7dc87b4dd5698087a342646d4
This commit is contained in:
xin.zhang 2025-01-17 18:24:06 +08:00 committed by lane.wei
parent 2ec50f771f
commit 05f67d14f6
2 changed files with 10 additions and 1 deletions

View File

@ -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)

View File

@ -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<POItem> m_ops;