Merge branch 'master-remote' into SoftFever

# Conflicts:
#	resources/profiles/Creality.json
#	resources/profiles/Voron.json
#	version.inc
This commit is contained in:
SoftFever 2022-11-05 11:26:59 +08:00
commit 6fb941cf4c
26 changed files with 224 additions and 70 deletions

View file

@ -643,7 +643,7 @@ void SelectMachinePopup::update_other_devices()
m_placeholder_panel = new wxWindow(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxSize(-1,FromDIP(26)));
wxBoxSizer* placeholder_sizer = new wxBoxSizer(wxVERTICAL);
auto m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
m_hyperlink = new wxHyperlinkCtrl(m_placeholder_panel, wxID_ANY, _L("Can't find my devices?"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
placeholder_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
@ -860,6 +860,12 @@ void SelectMachinePopup::OnLeftUp(wxMouseEvent &event)
wxPostEvent(p->mPanel, event);
}
}
//hyper link
auto h_rect = m_hyperlink->ClientToScreen(wxPoint(0, 0));
if (mouse_pos.x > h_rect.x && mouse_pos.y > h_rect.y && mouse_pos.x < (h_rect.x + m_hyperlink->GetSize().x) && mouse_pos.y < (h_rect.y + m_hyperlink->GetSize().y)) {
wxLaunchDefaultBrowser(wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"));
}
}
}