FIX: add images for filament load steps
jira: [STUDIO-9850] Change-Id: Ie3f3dfbda3d7bc2e1e8c8bab4c9a5f2168536e53
This commit is contained in:
parent
0914300181
commit
89efa6cb27
Binary file not shown.
After Width: | Height: | Size: 214 KiB |
Binary file not shown.
After Width: | Height: | Size: 179 KiB |
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
Binary file not shown.
After Width: | Height: | Size: 222 KiB |
Binary file not shown.
After Width: | Height: | Size: 222 KiB |
|
@ -615,11 +615,10 @@ bool MachineObject::get_printer_is_enclosed() const
|
|||
return DeviceManager::get_printer_is_enclosed(printer_type);
|
||||
}
|
||||
|
||||
bool MachineObject::is_series_o() const
|
||||
{
|
||||
const std::string& series = DeviceManager::get_printer_series(printer_type);
|
||||
return (series == "series_o");
|
||||
}
|
||||
bool MachineObject::is_series_n() const { return DeviceManager::get_printer_series(printer_type) == "series_n"; };
|
||||
bool MachineObject::is_series_p() const { return DeviceManager::get_printer_series(printer_type) == "series_p1p"; };
|
||||
bool MachineObject::is_series_x() const { return DeviceManager::get_printer_series(printer_type) == "series_x1"; };
|
||||
bool MachineObject::is_series_o() const { return DeviceManager::get_printer_series(printer_type) == "series_o"; };
|
||||
|
||||
void MachineObject::reload_printer_settings()
|
||||
{
|
||||
|
|
|
@ -625,6 +625,9 @@ public:
|
|||
bool get_printer_is_enclosed() const;
|
||||
|
||||
// check printer device series
|
||||
bool is_series_n() const;
|
||||
bool is_series_p() const;
|
||||
bool is_series_x() const;
|
||||
bool is_series_o() const;
|
||||
|
||||
void reload_printer_settings();
|
||||
|
|
|
@ -1807,10 +1807,18 @@ wxBoxSizer* StatusBasePanel::create_filament_group(wxWindow* parent)
|
|||
|
||||
m_filament_step = new FilamentLoad(m_filament_load_box, wxID_ANY);
|
||||
m_filament_step->SetDoubleBuffered(true);
|
||||
m_filament_step->set_min_size(wxSize(wxSize(FromDIP(570), FromDIP(215))));
|
||||
m_filament_step->set_max_size(wxSize(wxSize(FromDIP(570), FromDIP(215))));
|
||||
m_filament_step->set_min_size(wxSize(wxSize(FromDIP(300), FromDIP(215))));
|
||||
m_filament_step->set_max_size(wxSize(wxSize(FromDIP(300), FromDIP(215))));
|
||||
m_filament_step->SetBackgroundColour(*wxWHITE);
|
||||
|
||||
m_filament_load_img = new wxStaticBitmap(m_filament_load_box, wxID_ANY, wxNullBitmap);
|
||||
m_filament_load_img->SetBackgroundColour(*wxWHITE);
|
||||
|
||||
wxBoxSizer *steps_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
steps_sizer->Add(m_filament_step, 0, wxALIGN_LEFT, FromDIP(20));
|
||||
steps_sizer->Add(m_filament_load_img, 0, wxALIGN_TOP, FromDIP(30));
|
||||
steps_sizer->AddSpacer(FromDIP(50));
|
||||
|
||||
StateColor btn_bd_white(std::pair<wxColour, int>(wxColour(255, 255, 254), StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
|
||||
StateColor btn_text_white(std::pair<wxColour, int>(wxColour(255, 255, 254), StateColor::Disabled), std::pair<wxColour, int>(wxColour(38, 46, 48), StateColor::Enabled));
|
||||
StateColor btn_bg_white(std::pair<wxColour, int>(AMS_CONTROL_DISABLE_COLOUR, StateColor::Disabled), std::pair<wxColour, int>(AMS_CONTROL_DISABLE_COLOUR, StateColor::Pressed),
|
||||
|
@ -1831,7 +1839,7 @@ wxBoxSizer* StatusBasePanel::create_filament_group(wxWindow* parent)
|
|||
});
|
||||
|
||||
|
||||
sizer_box->Add(m_filament_step, 0, wxALIGN_CENTER|wxTOP, FromDIP(10));
|
||||
sizer_box->Add(steps_sizer, 0, wxALIGN_CENTER | wxTOP, FromDIP(10));
|
||||
sizer_box->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||
sizer_box->Add(m_button_retry, 0, wxLEFT, FromDIP(28));
|
||||
sizer_box->Add(0, 0, 0, wxTOP, FromDIP(10));
|
||||
|
@ -1854,6 +1862,35 @@ void StatusBasePanel::expand_filament_loading(wxMouseEvent& e)
|
|||
tag_show = true;
|
||||
m_img_filament_loading->SetBitmap(create_scaled_bitmap("filament_load_expand", this, 24));
|
||||
}
|
||||
|
||||
if (obj)
|
||||
{
|
||||
static int load_img_size = 215;
|
||||
if (obj->is_series_n())
|
||||
{
|
||||
m_filament_load_img->SetBitmap(create_scaled_bitmap("filament_load_n_series", this, load_img_size));
|
||||
}
|
||||
else if (obj->is_series_x())
|
||||
{
|
||||
m_filament_load_img->SetBitmap(create_scaled_bitmap("filament_load_x_series", this, load_img_size));
|
||||
}
|
||||
else if (obj->is_series_p())
|
||||
{
|
||||
m_filament_load_img->SetBitmap(create_scaled_bitmap("filament_load_p_series", this, load_img_size));
|
||||
}
|
||||
else if (obj->is_series_o())
|
||||
{
|
||||
if (obj->get_current_extruder().id == MAIN_NOZZLE_ID)
|
||||
{
|
||||
m_filament_load_img->SetBitmap(create_scaled_bitmap("filament_load_o_series_right", this, load_img_size));
|
||||
}
|
||||
else if (obj->get_current_extruder().id == DEPUTY_NOZZLE_ID)
|
||||
{
|
||||
m_filament_load_img->SetBitmap(create_scaled_bitmap("filament_load_o_series_left", this, load_img_size));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_filament_load_box->Show(tag_show);
|
||||
///m_button_retry->Show(tag_show);
|
||||
m_filament_step->Show(tag_show);
|
||||
|
|
|
@ -491,6 +491,8 @@ protected:
|
|||
PrintingTaskPanel * m_project_task_panel;
|
||||
|
||||
FilamentLoad* m_filament_step;
|
||||
wxStaticBitmap *m_filament_load_img;
|
||||
|
||||
Button *m_button_retry {nullptr};
|
||||
StaticBox* m_filament_load_box;
|
||||
|
||||
|
|
Loading…
Reference in New Issue