mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Added msw_buttons_rescale() - Function for a scaling Dialog's buttons under MSW
This commit is contained in:
parent
3f978f6afe
commit
708037158e
17 changed files with 149 additions and 43 deletions
|
@ -8,7 +8,7 @@ namespace GUI {
|
|||
|
||||
PreferencesDialog::PreferencesDialog(wxWindow* parent) :
|
||||
DPIDialog(parent, wxID_ANY, _(L("Preferences")), wxDefaultPosition,
|
||||
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||
wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
|
||||
{
|
||||
build();
|
||||
}
|
||||
|
@ -146,11 +146,14 @@ void PreferencesDialog::on_dpi_changed(const wxRect &suggested_rect)
|
|||
{
|
||||
m_optgroup->msw_rescale();
|
||||
|
||||
const int& em = em_unit();
|
||||
const wxSize& size = wxSize(50 * em, 29 * em);
|
||||
const int em = em_unit();
|
||||
|
||||
msw_buttons_rescale(this, em, { wxID_OK, wxID_CANCEL });
|
||||
|
||||
const wxSize& size = wxSize(47 * em, 28 * em);
|
||||
|
||||
SetMinSize(size);
|
||||
SetSize(size);
|
||||
Fit();
|
||||
|
||||
Refresh();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue