Fix to last commit

This commit is contained in:
YuSanka 2019-02-11 15:36:05 +01:00
parent f899cf1c91
commit 290c6206cd
3 changed files with 7 additions and 6 deletions

View file

@ -543,7 +543,7 @@ Sidebar::Sidebar(Plater *parent)
p->scrolled->SetSizer(scrolled_sizer);
// Sizer with buttons for mode changing
p->mode_sizer = new PrusaModeSizer(p->scrolled);
p->mode_sizer = new PrusaModeSizer(p->scrolled, 2 * wxGetApp().em_unit());
// The preset chooser
p->sizer_presets = new wxFlexGridSizer(10, 1, 1, 2);
@ -633,7 +633,7 @@ Sidebar::Sidebar(Plater *parent)
btns_sizer->Add(p->btn_export_gcode, 0, wxEXPAND | wxTOP, margin_5);
auto *sizer = new wxBoxSizer(wxVERTICAL);
sizer->Add(p->scrolled, 1, wxEXPAND | wxTOP, margin_5);
sizer->Add(p->scrolled, 1, wxEXPAND);
sizer->Add(btns_sizer, 0, wxEXPAND | wxLEFT, margin_5);
SetSizer(sizer);

View file

@ -2390,8 +2390,8 @@ void PrusaModeButton::focus_button(const bool focus)
// PrusaModeSizer
// ----------------------------------------------------------------------------
PrusaModeSizer::PrusaModeSizer(wxWindow *parent) :
wxFlexGridSizer(3, 0, 2* Slic3r::GUI::wxGetApp().em_unit()/*5*/)
PrusaModeSizer::PrusaModeSizer(wxWindow *parent, int hgap/* = 10*/) :
wxFlexGridSizer(3, 0, hgap)
{
SetFlexibleDirection(wxHORIZONTAL);
@ -2405,7 +2405,8 @@ PrusaModeSizer::PrusaModeSizer(wxWindow *parent) :
for (const auto& button : buttons) {
int x, y;
parent->GetTextExtent(button.first, &x, &y, nullptr, nullptr, &Slic3r::GUI::wxGetApp().bold_font());
const wxSize size = wxSize(x + button.second.GetWidth() + Slic3r::GUI::wxGetApp().em_unit(), y);
const wxSize size = wxSize(x + button.second.GetWidth() + Slic3r::GUI::wxGetApp().em_unit(),
y + Slic3r::GUI::wxGetApp().em_unit());
mode_btns.push_back(new PrusaModeButton(parent, wxID_ANY, button.first, button.second, size));
}

View file

@ -913,7 +913,7 @@ private:
class PrusaModeSizer : public wxFlexGridSizer
{
public:
PrusaModeSizer( wxWindow *parent);
PrusaModeSizer( wxWindow *parent, int hgap = 10);
~PrusaModeSizer() {}
void SetMode(const /*ConfigOptionMode*/int mode);