diff options
author | YuSanka <yusanka@gmail.com> | 2019-04-18 03:03:40 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2019-04-18 03:03:40 +0300 |
commit | e97e8c6af61c6c18634da46ad92b5aec1b932158 (patch) | |
tree | e365d3a532cd33cf38425a1f262208100f77f73d /src/slic3r/GUI/Preferences.cpp | |
parent | 077321b228814fbca66937812ea204842582f4b2 (diff) |
Overrided on_dpi_changed() for some Dialogs:
BedShapeDialog, KBShortcutsDialog, ConfigWizard, Preferences
Diffstat (limited to 'src/slic3r/GUI/Preferences.cpp')
-rw-r--r-- | src/slic3r/GUI/Preferences.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 96a2f3618..62bcb9d9b 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -7,7 +7,9 @@ namespace Slic3r { namespace GUI { PreferencesDialog::PreferencesDialog(wxWindow* parent) : - wxDialog(parent, wxID_ANY, _(L("Preferences")), wxDefaultPosition, wxDefaultSize) { + DPIDialog(parent, wxID_ANY, _(L("Preferences")), wxDefaultPosition, + wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) +{ build(); } @@ -15,7 +17,7 @@ void PreferencesDialog::build() { auto app_config = get_app_config(); m_optgroup = std::make_shared<ConfigOptionsGroup>(this, _(L("General"))); - m_optgroup->label_width = 40; //400; + m_optgroup->label_width = 40; m_optgroup->m_on_change = [this](t_config_option_key opt_key, boost::any value){ m_values[opt_key] = boost::any_cast<bool>(value) ? "1" : "0"; }; @@ -140,5 +142,18 @@ void PreferencesDialog::accept() wxGetApp().update_ui_from_settings(); } +void PreferencesDialog::on_dpi_changed(const wxRect &suggested_rect) +{ + m_optgroup->rescale(); + + const int& em = em_unit(); + const wxSize& size = wxSize(50 * em, 29 * em); + + SetMinSize(size); + SetSize(size); + + Refresh(); +} + } // GUI } // Slic3r
\ No newline at end of file |