Merge branch 'dk_wizard'

This commit is contained in:
David Kocik 2021-02-24 09:22:30 +01:00
commit 19f849a6d9
2 changed files with 11 additions and 3 deletions

View file

@ -1501,6 +1501,7 @@ ConfigWizardIndex::ConfigWizardIndex(wxWindow *parent)
sizer->AddStretchSpacer(); sizer->AddStretchSpacer();
sizer->Add(logo); sizer->Add(logo);
SetSizer(sizer); SetSizer(sizer);
logo_height = logo->GetBitmap().GetHeight();
Bind(wxEVT_PAINT, &ConfigWizardIndex::on_paint, this); Bind(wxEVT_PAINT, &ConfigWizardIndex::on_paint, this);
Bind(wxEVT_MOTION, &ConfigWizardIndex::on_mouse_move, this); Bind(wxEVT_MOTION, &ConfigWizardIndex::on_mouse_move, this);
@ -1653,6 +1654,11 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt)
Refresh(); Refresh();
}); });
} }
if ((int)y + logo_height > size.GetHeight())
logo->Hide();
else
logo->Show();
} }
void ConfigWizardIndex::on_mouse_move(wxMouseEvent &evt) void ConfigWizardIndex::on_mouse_move(wxMouseEvent &evt)

View file

@ -518,6 +518,8 @@ private:
ssize_t item_hover; ssize_t item_hover;
size_t last_page; size_t last_page;
int logo_height;
int item_height() const { return std::max(bullet_black.bmp().GetSize().GetHeight(), em_w) + em_w; } int item_height() const { return std::max(bullet_black.bmp().GetSize().GetHeight(), em_w) + em_w; }
void on_paint(wxPaintEvent &evt); void on_paint(wxPaintEvent &evt);