mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-30 01:54:40 +08:00
Fix the typo in 932dfb4fcab6c3248a4015827018d1f4b5582d3a
The resize of the Spincontrol was wrong placed in the code
This commit is contained in:
parent
d962d431c0
commit
172c1bbab7
@ -693,6 +693,11 @@ void SpinCtrl::BUILD() {
|
|||||||
|
|
||||||
auto temp = new wxSpinCtrl(m_parent, wxID_ANY, text_value, wxDefaultPosition, size,
|
auto temp = new wxSpinCtrl(m_parent, wxID_ANY, text_value, wxDefaultPosition, size,
|
||||||
0|wxTE_PROCESS_ENTER, min_val, max_val, default_value);
|
0|wxTE_PROCESS_ENTER, min_val, max_val, default_value);
|
||||||
|
#ifdef __WXGTK3__
|
||||||
|
wxSize best_sz = temp->GetBestSize();
|
||||||
|
if (best_sz.x > size.x)
|
||||||
|
temp->SetSize(wxSize(size.x + 2 * best_sz.y, best_sz.y));
|
||||||
|
#endif //__WXGTK3__
|
||||||
temp->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
temp->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||||
if (!wxOSX) temp->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
if (!wxOSX) temp->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
|
|
||||||
@ -1482,11 +1487,6 @@ void SliderCtrl::BUILD()
|
|||||||
|
|
||||||
m_textctrl = new wxTextCtrl(m_parent, wxID_ANY, wxString::Format("%d", m_slider->GetValue()/m_scale),
|
m_textctrl = new wxTextCtrl(m_parent, wxID_ANY, wxString::Format("%d", m_slider->GetValue()/m_scale),
|
||||||
wxDefaultPosition, field_size);
|
wxDefaultPosition, field_size);
|
||||||
#ifdef __WXGTK3__
|
|
||||||
wxSize best_sz = m_textctrl->GetBestSize();
|
|
||||||
if (best_sz.x > size.x)
|
|
||||||
m_textctrl->SetSize(wxSize(size.x + 2 * best_sz.y, best_sz.y));
|
|
||||||
#endif //__WXGTK3__
|
|
||||||
m_textctrl->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
m_textctrl->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||||
m_textctrl->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
m_textctrl->SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user