mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 03:37:54 -06:00
config wizard - hide logo if small height
This commit is contained in:
parent
fcb714cd24
commit
8ca225b38a
2 changed files with 11 additions and 3 deletions
|
@ -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);
|
||||
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue