From 6cf47f3e6154c44864b22b8595bf560060cc58e9 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Sun, 27 Dec 2020 23:46:43 +0100 Subject: [PATCH] Use monospace font in placeholder parser error messages (Linux fix) Previous implementation did not use monospace font on Linux. According to a note from @wavexx in ba7f39a: "wxSYS_ANSI_FIXED_FONT use the same as DEFAULT in wxGtk". This commit uses the same workaround by actually loading the font from GUI_App. --- src/slic3r/GUI/MsgDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/MsgDialog.cpp b/src/slic3r/GUI/MsgDialog.cpp index 043224375..d90f4de10 100644 --- a/src/slic3r/GUI/MsgDialog.cpp +++ b/src/slic3r/GUI/MsgDialog.cpp @@ -77,7 +77,7 @@ ErrorDialog::ErrorDialog(wxWindow *parent, const wxString &msg, bool monospaced_ { html->SetMinSize(wxSize(40 * wxGetApp().em_unit(), monospaced_font ? 30 * wxGetApp().em_unit() : -1)); wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); - wxFont monospace = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT); + wxFont monospace = wxGetApp().code_font(); wxColour text_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); wxColour bgr_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW); auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());