Fixed scale of the PrusaDoubleSlider and typo in SysInfoDialog

This commit is contained in:
YuSanka 2019-02-06 12:04:17 +01:00
parent b2410e0f23
commit 3fdabfd7d3
2 changed files with 3 additions and 5 deletions

View file

@ -46,7 +46,7 @@ SysInfoDialog::SysInfoDialog()
hsizer->SetMinSize(wxSize(50 * wxGetApp().em_unit(), -1));
auto main_sizer = new wxBoxSizer(wxVERTICAL);
main_sizer->Add(hsizer, 0, wxEXPAND | wxALL, 10);
main_sizer->Add(hsizer, 1, wxEXPAND | wxALL, 10);
// logo
wxBitmap logo_bmp = wxBitmap(from_u8(Slic3r::var("Slic3r_192px.png")), wxBITMAP_TYPE_PNG);
@ -93,8 +93,6 @@ SysInfoDialog::SysInfoDialog()
vsizer->Add(html, 1, wxEXPAND | wxBOTTOM, wxGetApp().em_unit());
}
// hsizer->Add(vsizer, 1, wxEXPAND | wxLEFT, 20);
// main_sizer->Add(hsizer, 1, wxEXPAND | wxALL, 10);
// opengl_info
wxHtmlWindow* opengl_info_html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
{

View file

@ -1454,7 +1454,7 @@ PrusaDoubleSlider::PrusaDoubleSlider(wxWindow *parent,
Bind(wxEVT_RIGHT_UP, &PrusaDoubleSlider::OnRightUp, this);
// control's view variables
SLIDER_MARGIN = 4 + (style == wxSL_HORIZONTAL ? m_bmp_thumb_higher.GetWidth() : m_bmp_thumb_higher.GetHeight());
SLIDER_MARGIN = 4 + Slic3r::GUI::wxGetApp().em_unit();//(style == wxSL_HORIZONTAL ? m_bmp_thumb_higher.GetWidth() : m_bmp_thumb_higher.GetHeight());
DARK_ORANGE_PEN = wxPen(wxColour(253, 84, 2));
ORANGE_PEN = wxPen(wxColour(253, 126, 66));
@ -1480,7 +1480,7 @@ wxSize PrusaDoubleSlider::DoGetBestSize() const
const wxSize size = wxControl::DoGetBestSize();
if (size.x > 1 && size.y > 1)
return size;
const int new_size = is_horizontal() ? 6 * Slic3r::GUI::wxGetApp().em_unit() : 10 * Slic3r::GUI::wxGetApp().em_unit();
const int new_size = is_horizontal() ? 6 * Slic3r::GUI::wxGetApp().em_unit() : 8 * Slic3r::GUI::wxGetApp().em_unit();
return wxSize(new_size, new_size);
}