mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-23 00:42:33 +00:00
feature update soft upgrade logic for protocol.
This commit is contained in:
@@ -176,17 +176,12 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates, bool force_
|
||||
|
||||
wxBoxSizer *content_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const auto lang_code = wxGetApp().current_language_code_safe().ToStdString();
|
||||
|
||||
auto *versions = new wxBoxSizer(wxVERTICAL);
|
||||
// BBS: use changelog string instead of url
|
||||
wxStaticText *changelog_textctrl = new wxStaticText(m_scrollwindw_release_note, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(560), -1));
|
||||
|
||||
|
||||
for (const auto &update : updates) {
|
||||
auto* versions = new wxBoxSizer(wxVERTICAL);
|
||||
wxStaticText* changelog_textctrl = new wxStaticText(m_scrollwindw_release_note, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
@@ -211,12 +206,8 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates, bool force_
|
||||
|
||||
versions->Add(flex);
|
||||
|
||||
|
||||
|
||||
// BBS: use changelog string instead of url
|
||||
|
||||
//auto change_log = new wxStaticText(m_scrollwindw_release_note, wxID_ANY, from_u8(update.change_log), wxDefaultPosition, wxDefaultSize);
|
||||
changelog_textctrl->SetLabel(changelog_textctrl->GetLabel() + wxString::Format("%s\n", from_u8(update.change_log)));
|
||||
//auto change_log = new wxStaticText(m_scrollwindw_release_note, wxID_ANY, from_u8(update.change_log), wxDefaultPosition, wxDefaultSize);
|
||||
changelog_textctrl->SetLabel(changelog_textctrl->GetLabel() + wxString::Format("%s\n", from_u8(update.change_log)));
|
||||
|
||||
content_sizer->Add(versions);
|
||||
|
||||
@@ -224,16 +215,13 @@ MsgUpdateConfig::MsgUpdateConfig(const std::vector<Update> &updates, bool force_
|
||||
if (changelog_textctrl)
|
||||
content_sizer->Add(changelog_textctrl, 1, wxEXPAND | wxTOP, FromDIP(30));
|
||||
}
|
||||
|
||||
|
||||
m_butto_ok->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &) { EndModal(wxID_OK); });
|
||||
m_button_cancel->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &) { EndModal(wxID_CLOSE); });
|
||||
|
||||
|
||||
m_scrollwindw_release_note->SetSizer(content_sizer);
|
||||
m_scrollwindw_release_note->Layout();
|
||||
|
||||
|
||||
SetSizer(m_sizer_main);
|
||||
Layout();
|
||||
m_sizer_main->Fit(this);
|
||||
|
||||
Reference in New Issue
Block a user