mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX:Use url links to display Releasenote
Change-Id: Ib57931d71702d1356b10bd4c665017b3331189aa
This commit is contained in:
parent
42e08b5414
commit
ecc76d0f33
3 changed files with 21 additions and 4 deletions
|
@ -272,7 +272,7 @@ void UpdateVersionDialog::on_dpi_changed(const wxRect &suggested_rect) {
|
|||
m_button_cancel->Rescale();
|
||||
}
|
||||
|
||||
void UpdateVersionDialog::update_version_info(wxString release_note, wxString version)
|
||||
void UpdateVersionDialog::update_version_info(std::string url)
|
||||
{
|
||||
/*m_text_up_info->SetLabel(wxString::Format(_L("Click to download new version in default browser: %s"), version));
|
||||
wxBoxSizer *sizer_text_release_note = new wxBoxSizer(wxVERTICAL);
|
||||
|
@ -281,6 +281,23 @@ void UpdateVersionDialog::update_version_info(wxString release_note, wxString ve
|
|||
sizer_text_release_note->Add(m_staticText_release_note, 0, wxALL, 5);
|
||||
m_scrollwindw_release_note->SetSizer(sizer_text_release_note);
|
||||
m_scrollwindw_release_note->Layout();*/
|
||||
|
||||
if (url.empty()) {
|
||||
fs::path ph(data_dir());
|
||||
ph /= "resources/tooltip/common/releasenote.html";
|
||||
if (!fs::exists(ph)) {
|
||||
ph = resources_dir();
|
||||
ph /= "tooltip/releasenote.html";
|
||||
}
|
||||
auto url = ph.string();
|
||||
std::replace(url.begin(), url.end(), '\\', '/');
|
||||
url = "file:///" + url;
|
||||
m_scrollwindw_release_note->LoadURL(from_u8(url));
|
||||
}
|
||||
else {
|
||||
m_scrollwindw_release_note->LoadURL(from_u8(url));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue