FIX:fixed cant not link to wiki on macos
Change-Id: I8c7fc943e9c6eb46c1f7a63dcd32f0a9a7f120d3 (cherry picked from commit 1fd7ef86e39c979e8b986c9f6d6db239949682cd)
This commit is contained in:
parent
badd314724
commit
db233c6051
|
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -198,6 +198,7 @@ private:
|
|||
int m_my_devices_count{0};
|
||||
int m_other_devices_count{0};
|
||||
wxWindow* m_placeholder_panel{nullptr};
|
||||
wxHyperlinkCtrl* m_hyperlink{nullptr};
|
||||
wxBoxSizer * m_sizer_body{nullptr};
|
||||
wxBoxSizer * m_sizer_my_devices{nullptr};
|
||||
wxBoxSizer * m_sizer_other_devices{nullptr};
|
||||
|
|
Loading…
Reference in New Issue