Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer

This commit is contained in:
enricoturri1966 2020-05-04 09:37:29 +02:00
commit 813e268d7e
39 changed files with 2878 additions and 667 deletions

View file

@ -951,5 +951,40 @@ void ScalableButton::msw_rescale()
}
// ----------------------------------------------------------------------------
// BlinkingBitmap
// ----------------------------------------------------------------------------
BlinkingBitmap::BlinkingBitmap(wxWindow* parent, const std::string& icon_name) :
wxStaticBitmap(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize(int(1.6 * Slic3r::GUI::wxGetApp().em_unit()), -1))
{
bmp = ScalableBitmap(parent, icon_name);
}
void BlinkingBitmap::msw_rescale()
{
bmp.msw_rescale();
this->SetSize(bmp.GetBmpSize());
this->SetMinSize(bmp.GetBmpSize());
}
void BlinkingBitmap::invalidate()
{
this->SetBitmap(wxNullBitmap);
}
void BlinkingBitmap::activate()
{
this->SetBitmap(bmp.bmp());
show = true;
}
void BlinkingBitmap::blink()
{
show = !show;
this->SetBitmap(show ? bmp.bmp() : wxNullBitmap);
}