ENH:optimized msg window style
Change-Id: I2acf6b8fe8f058a1aad8b782deb0d43334d3a770
This commit is contained in:
parent
060ba6c70e
commit
fb68d7745f
|
@ -312,7 +312,7 @@ static void add_msg_content(wxWindow* parent, wxBoxSizer* content_sizer, wxStrin
|
||||||
// Code formatting will be preserved. This is useful for reporting errors from the placeholder parser.
|
// Code formatting will be preserved. This is useful for reporting errors from the placeholder parser.
|
||||||
msg_escaped = std::string("<pre><code>") + msg_escaped + "</code></pre>";
|
msg_escaped = std::string("<pre><code>") + msg_escaped + "</code></pre>";
|
||||||
html->SetPage("<html><body bgcolor=\"" + bgr_clr_str + "\"><font color=\"" + text_clr_str + "\">" + wxString::FromUTF8(msg_escaped.data()) + "</font></body></html>");
|
html->SetPage("<html><body bgcolor=\"" + bgr_clr_str + "\"><font color=\"" + text_clr_str + "\">" + wxString::FromUTF8(msg_escaped.data()) + "</font></body></html>");
|
||||||
content_sizer->Add(html, 1, wxEXPAND);
|
content_sizer->Add(html, 1, wxEXPAND|wxRIGHT,12);
|
||||||
wxGetApp().UpdateDarkUIWin(html);
|
wxGetApp().UpdateDarkUIWin(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1623,6 +1623,7 @@ void StatusPanel::update(MachineObject *obj)
|
||||||
if (!m_show_mode_changed) {
|
if (!m_show_mode_changed) {
|
||||||
m_show_mode_changed = true;
|
m_show_mode_changed = true;
|
||||||
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
||||||
|
msg_wingow.SetSize(wxSize(FromDIP(600), FromDIP(200)));
|
||||||
if (msg_wingow.ShowModal() == wxID_OK || msg_wingow.ShowModal() == wxID_CLOSE) {
|
if (msg_wingow.ShowModal() == wxID_OK || msg_wingow.ShowModal() == wxID_CLOSE) {
|
||||||
m_show_mode_changed = false;
|
m_show_mode_changed = false;
|
||||||
}
|
}
|
||||||
|
@ -1632,16 +1633,20 @@ void StatusPanel::update(MachineObject *obj)
|
||||||
|
|
||||||
//cloud = > lan
|
//cloud = > lan
|
||||||
if (iter_connect_type->second == "cloud" && obj->dev_connection_type == "lan") {
|
if (iter_connect_type->second == "cloud" && obj->dev_connection_type == "lan") {
|
||||||
wxString txt = _L("Disconnected from printer [%s] due to LAN mode enabled.Please reconnect the printer by inputting Access Code which can be gotten from printer screen.");
|
|
||||||
wxString msg = wxString::Format(txt, obj->dev_name);
|
if (!obj->is_connected()) {
|
||||||
if (!m_show_mode_changed) {
|
wxString txt = _L("Disconnected from printer [%s] due to LAN mode enabled.Please reconnect the printer by inputting Access Code which can be gotten from printer screen.");
|
||||||
m_show_mode_changed = true;
|
wxString msg = wxString::Format(txt, obj->dev_name);
|
||||||
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
if (!m_show_mode_changed) {
|
||||||
if (msg_wingow.ShowModal() == wxID_OK || msg_wingow.ShowModal() == wxID_CLOSE) {
|
m_show_mode_changed = true;
|
||||||
m_show_mode_changed = false;
|
MessageDialog msg_wingow(nullptr, msg, wxEmptyString, wxICON_WARNING | wxOK);
|
||||||
|
msg_wingow.SetSize(wxSize(FromDIP(600), FromDIP(200)));
|
||||||
|
if (msg_wingow.ShowModal() == wxID_OK || msg_wingow.ShowModal() == wxID_CLOSE) {
|
||||||
|
m_show_mode_changed = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
m_print_connect_types[obj->dev_id] = obj->dev_connection_type;
|
||||||
}
|
}
|
||||||
m_print_connect_types[obj->dev_id] = obj->dev_connection_type;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue