Some _cosmetic_ fixes :

+ Set wxDEFAULT_DIALOG_STYLE for MsgDialog
+ Changed Msg text before language changing
This commit is contained in:
YuSanka 2019-03-28 10:54:56 +01:00
parent d209aaa200
commit 016b5e35b6
3 changed files with 8 additions and 12 deletions

View file

@ -649,20 +649,16 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
} }
case ConfigMenuLanguage: case ConfigMenuLanguage:
{ {
/* Before change application language, let's check unsaved changes /* Before change application language, let's check unsaved changes on 3D-Scene
* and draw user's attention to the application restarting after a language change * and draw user's attention to the application restarting after a language change
*/ */
wxMessageDialog dialog(nullptr, wxMessageDialog dialog(nullptr,
_(L("Application will be restarted after language change, " _(L("Application will be restarted after language change.")) + "\n" +
"and 3D-Scene will be cleaned.")) + "\n" + _(L("3D-Scene will be cleaned.")) + "\n\n" +
_(L("Please, check your changes before.")) + "\n\n" + _(L("Please, check your changes before.")),
_(L("Continue anyway?")),
_(L("Attention!")), _(L("Attention!")),
wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT); wxICON_QUESTION | wxOK | wxCANCEL);
if ( dialog.ShowModal() != wxID_YES) if ( dialog.ShowModal() == wxID_CANCEL)
return;
if (!wxGetApp().check_unsaved_changes())
return; return;
wxArrayString names; wxArrayString names;

View file

@ -28,7 +28,7 @@ MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &he
{} {}
MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &headline, wxBitmap bitmap, wxWindowID button_id) : MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &headline, wxBitmap bitmap, wxWindowID button_id) :
wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxRESIZE_BORDER), wxDialog(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
boldfont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)), boldfont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)),
content_sizer(new wxBoxSizer(wxVERTICAL)), content_sizer(new wxBoxSizer(wxVERTICAL)),
btn_sizer(new wxBoxSizer(wxHORIZONTAL)) btn_sizer(new wxBoxSizer(wxHORIZONTAL))

View file

@ -427,7 +427,7 @@ FreqChangedParams::FreqChangedParams(wxWindow* parent, const int label_width) :
option = m_og->get_option("fill_density"); option = m_og->get_option("fill_density");
option.opt.label = L("Infill"); option.opt.label = L("Infill");
option.opt.width = 5 * wxGetApp().em_unit(); option.opt.width = 6 * wxGetApp().em_unit();
option.opt.sidetext = " "; option.opt.sidetext = " ";
line.append_option(option); line.append_option(option);