FIX:fixed print error has wrong layout
Change-Id: I668b32caeba9c3c2256c7a85b7858f98cd97fadc
This commit is contained in:
parent
86490d4cef
commit
53ed1f99ce
|
@ -20,7 +20,7 @@
|
||||||
#define TIMEOUT_FOR_STRAT 20000.f // milliseconds
|
#define TIMEOUT_FOR_STRAT 20000.f // milliseconds
|
||||||
#define REQUEST_PUSH_MIN_TIME 15000.f // milliseconds
|
#define REQUEST_PUSH_MIN_TIME 15000.f // milliseconds
|
||||||
#define REQUEST_START_MIN_TIME 15000.f // milliseconds
|
#define REQUEST_START_MIN_TIME 15000.f // milliseconds
|
||||||
#define EXTRUSION_OMIT_TIME 5000.f // milliseconds
|
#define EXTRUSION_OMIT_TIME 10000.f // milliseconds
|
||||||
|
|
||||||
#define FILAMENT_MAX_TEMP 300
|
#define FILAMENT_MAX_TEMP 300
|
||||||
#define FILAMENT_DEF_TEMP 220
|
#define FILAMENT_DEF_TEMP 220
|
||||||
|
|
|
@ -434,7 +434,7 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent, wxString name, wxSt
|
||||||
m_line_top->SetBackgroundColour(wxColour(166, 169, 170));
|
m_line_top->SetBackgroundColour(wxColour(166, 169, 170));
|
||||||
m_sizer_main->Add(m_line_top, 0, wxEXPAND, 0);
|
m_sizer_main->Add(m_line_top, 0, wxEXPAND, 0);
|
||||||
|
|
||||||
comfirm_before_enter_text = wxString::Format(_L("Cannot detect the LAN IP address of %s. Are %s and Bambu Studio in the same LAN?"), name, name);
|
//comfirm_before_enter_text = wxString::Format(_L("Cannot detect the LAN IP address of %s. Are %s and Bambu Studio in the same LAN?"), name, name);
|
||||||
|
|
||||||
//comfirm_after_enter_text = _L("Please input the LAN IP address of your printer manually. You can find the IP address on device's screen, Settings > Network > IP.");
|
//comfirm_after_enter_text = _L("Please input the LAN IP address of your printer manually. You can find the IP address on device's screen, Settings > Network > IP.");
|
||||||
|
|
||||||
|
@ -480,13 +480,13 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent, wxString name, wxSt
|
||||||
m_tips_note3->SetMinSize(wxSize(FromDIP(400), -1));
|
m_tips_note3->SetMinSize(wxSize(FromDIP(400), -1));
|
||||||
m_tips_note3->Wrap(FromDIP(400));
|
m_tips_note3->Wrap(FromDIP(400));
|
||||||
|
|
||||||
m_tips_ip->Hide();
|
/* m_tips_ip->Hide();
|
||||||
m_input_ip->Hide();
|
m_input_ip->Hide();
|
||||||
m_tips_access_code->Hide();
|
m_tips_access_code->Hide();
|
||||||
m_input_access_code->Hide();
|
m_input_access_code->Hide();
|
||||||
m_tips_note1->Hide();
|
m_tips_note1->Hide();
|
||||||
m_tips_note2->Hide();
|
m_tips_note2->Hide();
|
||||||
m_tips_note3->Hide();
|
m_tips_note3->Hide();*/
|
||||||
|
|
||||||
auto sizer_button = new wxBoxSizer(wxHORIZONTAL);
|
auto sizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
|
||||||
|
@ -540,6 +540,26 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow* parent, wxString name, wxSt
|
||||||
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(10));
|
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(10));
|
||||||
m_sizer_main->Add(sizer_button, 1, wxLEFT|wxRIGHT|wxEXPAND, FromDIP(18));
|
m_sizer_main->Add(sizer_button, 1, wxLEFT|wxRIGHT|wxEXPAND, FromDIP(18));
|
||||||
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(5));
|
m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(5));
|
||||||
|
|
||||||
|
|
||||||
|
tip->SetLabel(comfirm_after_enter_text);
|
||||||
|
tip->SetMinSize(wxSize(FromDIP(420), -1));
|
||||||
|
tip->SetMaxSize(wxSize(FromDIP(420), -1));
|
||||||
|
tip->Wrap(FromDIP(420));
|
||||||
|
|
||||||
|
m_tips_ip->Show();
|
||||||
|
m_input_ip->Show();
|
||||||
|
m_tips_access_code->Show();
|
||||||
|
m_input_access_code->Show();
|
||||||
|
m_tips_note1->Show();
|
||||||
|
m_tips_note2->Show();
|
||||||
|
m_tips_note3->Show();
|
||||||
|
m_button_ok->Enable(false);
|
||||||
|
m_button_ok->SetBackgroundColor(wxColour(0x90, 0x90, 0x90));
|
||||||
|
m_button_ok->SetBorderColor(wxColour(0x90, 0x90, 0x90));
|
||||||
|
Layout();
|
||||||
|
Fit();
|
||||||
|
|
||||||
SetSizer(m_sizer_main);
|
SetSizer(m_sizer_main);
|
||||||
Layout();
|
Layout();
|
||||||
m_sizer_main->Fit(this);
|
m_sizer_main->Fit(this);
|
||||||
|
@ -566,7 +586,7 @@ bool InputIpAddressDialog::isIp(std::string ipstr)
|
||||||
|
|
||||||
void InputIpAddressDialog::on_ok(wxMouseEvent& evt)
|
void InputIpAddressDialog::on_ok(wxMouseEvent& evt)
|
||||||
{
|
{
|
||||||
if (!m_input_ip->IsShown()) {
|
/*if (!m_input_ip->IsShown()) {
|
||||||
tip->SetLabel(comfirm_after_enter_text);
|
tip->SetLabel(comfirm_after_enter_text);
|
||||||
tip->SetMinSize(wxSize(FromDIP(420), -1));
|
tip->SetMinSize(wxSize(FromDIP(420), -1));
|
||||||
tip->SetMaxSize(wxSize(FromDIP(420), -1));
|
tip->SetMaxSize(wxSize(FromDIP(420), -1));
|
||||||
|
@ -602,14 +622,23 @@ void InputIpAddressDialog::on_ok(wxMouseEvent& evt)
|
||||||
else {
|
else {
|
||||||
wxString ip = m_input_ip->GetTextCtrl()->GetValue();
|
wxString ip = m_input_ip->GetTextCtrl()->GetValue();
|
||||||
wxString str_access_code = m_input_access_code->GetTextCtrl()->GetValue();
|
wxString str_access_code = m_input_access_code->GetTextCtrl()->GetValue();
|
||||||
wxString input_str = wxString::Format("%s|%s",ip, str_access_code);
|
wxString input_str = wxString::Format("%s|%s", ip, str_access_code);
|
||||||
|
|
||||||
auto event = wxCommandEvent(EVT_ENTER_IP_ADDRESS);
|
auto event = wxCommandEvent(EVT_ENTER_IP_ADDRESS);
|
||||||
event.SetString(input_str);
|
event.SetString(input_str);
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
wxPostEvent(this, event);
|
wxPostEvent(this, event);
|
||||||
EndModal(wxID_YES);
|
EndModal(wxID_YES);
|
||||||
}
|
}*/
|
||||||
|
wxString ip = m_input_ip->GetTextCtrl()->GetValue();
|
||||||
|
wxString str_access_code = m_input_access_code->GetTextCtrl()->GetValue();
|
||||||
|
wxString input_str = wxString::Format("%s|%s", ip, str_access_code);
|
||||||
|
|
||||||
|
auto event = wxCommandEvent(EVT_ENTER_IP_ADDRESS);
|
||||||
|
event.SetString(input_str);
|
||||||
|
event.SetEventObject(this);
|
||||||
|
wxPostEvent(this, event);
|
||||||
|
EndModal(wxID_YES);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputIpAddressDialog::on_text(wxCommandEvent& evt)
|
void InputIpAddressDialog::on_text(wxCommandEvent& evt)
|
||||||
|
|
|
@ -605,11 +605,15 @@ SecondaryCheckDialog::SecondaryCheckDialog(wxWindow* parent, wxWindowID id, cons
|
||||||
void SecondaryCheckDialog::update_text(wxString text)
|
void SecondaryCheckDialog::update_text(wxString text)
|
||||||
{
|
{
|
||||||
wxBoxSizer* sizer_text_release_note = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* sizer_text_release_note = new wxBoxSizer(wxVERTICAL);
|
||||||
auto m_staticText_release_note = new Label(m_vebview_release_note, text);
|
|
||||||
m_staticText_release_note->Wrap(FromDIP(260));
|
if (!m_staticText_release_note) {
|
||||||
|
m_staticText_release_note = new Label(m_vebview_release_note, text);
|
||||||
|
}
|
||||||
|
|
||||||
m_staticText_release_note->SetSize(wxSize(FromDIP(260), -1));
|
m_staticText_release_note->SetSize(wxSize(FromDIP(260), -1));
|
||||||
m_staticText_release_note->SetMaxSize(wxSize(FromDIP(260), -1));
|
m_staticText_release_note->SetMaxSize(wxSize(FromDIP(260), -1));
|
||||||
m_staticText_release_note->SetMinSize(wxSize(FromDIP(260), -1));
|
m_staticText_release_note->SetMinSize(wxSize(FromDIP(260), -1));
|
||||||
|
m_staticText_release_note->Wrap(FromDIP(260));
|
||||||
|
|
||||||
wxBoxSizer* top_blank_sizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* top_blank_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
wxBoxSizer* bottom_blank_sizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer* bottom_blank_sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
|
@ -122,6 +122,7 @@ public:
|
||||||
~SecondaryCheckDialog();
|
~SecondaryCheckDialog();
|
||||||
void on_dpi_changed(const wxRect& suggested_rect);
|
void on_dpi_changed(const wxRect& suggested_rect);
|
||||||
|
|
||||||
|
Label* m_staticText_release_note {nullptr};
|
||||||
wxBoxSizer* m_sizer_main;
|
wxBoxSizer* m_sizer_main;
|
||||||
wxScrolledWindow *m_vebview_release_note {nullptr};
|
wxScrolledWindow *m_vebview_release_note {nullptr};
|
||||||
Button* m_button_ok;
|
Button* m_button_ok;
|
||||||
|
|
|
@ -830,7 +830,7 @@ AMSRoad::AMSRoad(wxWindow *parent, wxWindowID id, Caninfo info, int canindex, in
|
||||||
wxWindow::SetBackgroundColour(AMS_CONTROL_DEF_BLOCK_BK_COLOUR);
|
wxWindow::SetBackgroundColour(AMS_CONTROL_DEF_BLOCK_BK_COLOUR);
|
||||||
|
|
||||||
Bind(wxEVT_MOTION, [this](wxMouseEvent& e) {
|
Bind(wxEVT_MOTION, [this](wxMouseEvent& e) {
|
||||||
if (m_canindex == 3) {
|
if (m_canindex == 3 && m_show_humidity) {
|
||||||
auto mouse_pos = ClientToScreen(e.GetPosition());
|
auto mouse_pos = ClientToScreen(e.GetPosition());
|
||||||
auto rect = ClientToScreen(wxPoint(0, 0));
|
auto rect = ClientToScreen(wxPoint(0, 0));
|
||||||
|
|
||||||
|
@ -967,6 +967,10 @@ void AMSRoad::doRender(wxDC &dc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_canindex == 3) {
|
if (m_canindex == 3) {
|
||||||
|
|
||||||
|
if (m_amsinfo.ams_humidity >= 1 && m_amsinfo.ams_humidity <= 5) {m_show_humidity = true;}
|
||||||
|
else {m_show_humidity = false;}
|
||||||
|
|
||||||
if (m_amsinfo.ams_humidity == 5) {
|
if (m_amsinfo.ams_humidity == 5) {
|
||||||
dc.DrawBitmap(ams_humidity_4.bmp(), wxPoint(size.x - ams_humidity_4.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_4.GetBmpSize().y - FromDIP(8)));
|
dc.DrawBitmap(ams_humidity_4.bmp(), wxPoint(size.x - ams_humidity_4.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_4.GetBmpSize().y - FromDIP(8)));
|
||||||
}
|
}
|
||||||
|
@ -974,6 +978,7 @@ void AMSRoad::doRender(wxDC &dc)
|
||||||
dc.DrawBitmap(ams_humidity_3.bmp(), wxPoint(size.x - ams_humidity_3.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_3.GetBmpSize().y - FromDIP(8)));
|
dc.DrawBitmap(ams_humidity_3.bmp(), wxPoint(size.x - ams_humidity_3.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_3.GetBmpSize().y - FromDIP(8)));
|
||||||
}
|
}
|
||||||
else if (m_amsinfo.ams_humidity == 3) {
|
else if (m_amsinfo.ams_humidity == 3) {
|
||||||
|
|
||||||
dc.DrawBitmap(ams_humidity_2.bmp(), wxPoint(size.x - ams_humidity_2.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_2.GetBmpSize().y - FromDIP(8)));
|
dc.DrawBitmap(ams_humidity_2.bmp(), wxPoint(size.x - ams_humidity_2.GetBmpSize().x - FromDIP(4), size.y - ams_humidity_2.GetBmpSize().y - FromDIP(8)));
|
||||||
}
|
}
|
||||||
else if (m_amsinfo.ams_humidity == 2) {
|
else if (m_amsinfo.ams_humidity == 2) {
|
||||||
|
|
Loading…
Reference in New Issue