diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp index 3d0888468..59908bd80 100644 --- a/src/slic3r/GUI/ConfigWizard.cpp +++ b/src/slic3r/GUI/ConfigWizard.cpp @@ -1501,6 +1501,7 @@ ConfigWizardIndex::ConfigWizardIndex(wxWindow *parent) sizer->AddStretchSpacer(); sizer->Add(logo); SetSizer(sizer); + logo_height = logo->GetBitmap().GetHeight(); Bind(wxEVT_PAINT, &ConfigWizardIndex::on_paint, this); Bind(wxEVT_MOTION, &ConfigWizardIndex::on_mouse_move, this); @@ -1617,15 +1618,15 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt) { const auto size = GetClientSize(); if (size.GetHeight() == 0 || size.GetWidth() == 0) { return; } - + wxPaintDC dc(this); - + const auto bullet_w = bullet_black.bmp().GetSize().GetWidth(); const auto bullet_h = bullet_black.bmp().GetSize().GetHeight(); const int yoff_icon = bullet_h < em_h ? (em_h - bullet_h) / 2 : 0; const int yoff_text = bullet_h > em_h ? (bullet_h - em_h) / 2 : 0; const int yinc = item_height(); - + int index_width = 0; unsigned y = 0; @@ -1653,6 +1654,11 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt) Refresh(); }); } + + if ((int)y + logo_height > size.GetHeight()) + logo->Hide(); + else + logo->Show(); } void ConfigWizardIndex::on_mouse_move(wxMouseEvent &evt) diff --git a/src/slic3r/GUI/ConfigWizard_private.hpp b/src/slic3r/GUI/ConfigWizard_private.hpp index 62ec6b18b..d9c0e2dc1 100644 --- a/src/slic3r/GUI/ConfigWizard_private.hpp +++ b/src/slic3r/GUI/ConfigWizard_private.hpp @@ -518,6 +518,8 @@ private: ssize_t item_hover; size_t last_page; + int logo_height; + int item_height() const { return std::max(bullet_black.bmp().GetSize().GetHeight(), em_w) + em_w; } void on_paint(wxPaintEvent &evt);