mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: get suitable font size to draw the texts
jira: [STUDIO-10067] Change-Id: I589fd6a271ae177e4630e403b64c18090aab9471 (cherry picked from commit d036c92a3793e8c0c758432b52f2af8ffeff751f)
This commit is contained in:
@@ -1029,6 +1029,7 @@ PinCodePanel::PinCodePanel(wxWindow* parent, int type, wxWindowID winid /*= wxID
|
||||
if (m_type == 0) {txt = _L("Bind with Pin Code");}
|
||||
else if (m_type == 1) {txt = _L("Bind with Access Code");}
|
||||
|
||||
WxFontUtils::get_suitable_font_size(0.5 * size.GetHeight(), dc);
|
||||
auto txt_size = dc.GetTextExtent(txt);
|
||||
dc.DrawText(txt, wxPoint(FromDIP(28), (size.y - txt_size.y) / 2));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user