diff --git a/src/slic3r/GUI/MsgDialog.cpp b/src/slic3r/GUI/MsgDialog.cpp index 9a34e3d..5092bd9 100644 --- a/src/slic3r/GUI/MsgDialog.cpp +++ b/src/slic3r/GUI/MsgDialog.cpp @@ -55,11 +55,14 @@ MsgDialog::MsgDialog(wxWindow *parent, const wxString &title, const wxString &he rightsizer->Add(content_sizer, 1, wxEXPAND); btn_sizer->AddStretchSpacer(); + //B44 logo = new wxStaticBitmap(this, wxID_ANY, bitmap.IsOk() ? bitmap : wxNullBitmap); - - topsizer->Add(logo, 0, wxALL, BORDER); - topsizer->Add(rightsizer, 1, wxTOP | wxBOTTOM | wxRIGHT | wxEXPAND, BORDER); - + if (style == 4) { + topsizer->Add(rightsizer, 1, wxLEFT | wxTOP | wxRIGHT | wxEXPAND, BORDER); + } else { + topsizer->Add(logo, 0, wxALL, BORDER); + topsizer->Add(rightsizer, 1, wxTOP | wxBOTTOM | wxRIGHT | wxEXPAND, BORDER); + } main_sizer->Add(topsizer, 1, wxEXPAND); main_sizer->Add(new StaticLine(this), 0, wxEXPAND | wxLEFT | wxRIGHT, HORIZ_SPACING); main_sizer->Add(btn_sizer, 0, wxALL | wxEXPAND, VERT_SPACING); @@ -107,7 +110,10 @@ void MsgDialog::apply_style(long style) std::string icon_name = style & wxICON_WARNING ? "exclamation" : style & wxICON_INFORMATION ? "info" : style & wxICON_QUESTION ? "question" : "QIDISlicer"; - logo->SetBitmap(*get_bmp_bundle(icon_name, 64)); + //B44 + if (style != 4) { + logo->SetBitmap(*get_bmp_bundle(icon_name, 64)); + } } void MsgDialog::finalize() diff --git a/src/slic3r/GUI/UpdateDialogs.cpp b/src/slic3r/GUI/UpdateDialogs.cpp index 3ebf4a8..3296c09 100644 --- a/src/slic3r/GUI/UpdateDialogs.cpp +++ b/src/slic3r/GUI/UpdateDialogs.cpp @@ -24,6 +24,10 @@ #include "wxExtensions.hpp" #include "format.hpp" +//B44 +#include "Widgets/WebView.hpp" + + namespace Slic3r { namespace GUI { @@ -97,12 +101,14 @@ bool MsgUpdateSlic3r::disable_version_check() const AppUpdateAvailableDialog::AppUpdateAvailableDialog(const Semver& ver_current, const Semver& ver_online, bool from_user) : MsgDialog(nullptr, _(L("App Update available")), wxString::Format(_(L("New version of %s is available.\nDo you wish to download it?")), SLIC3R_APP_NAME)) { - auto* versions = new wxFlexGridSizer(1, 0, VERT_SPACING); - versions->Add(new wxStaticText(this, wxID_ANY, _(L("Current version:")))); - versions->Add(new wxStaticText(this, wxID_ANY, ver_current.to_string())); - versions->Add(new wxStaticText(this, wxID_ANY, _(L("New version:")))); - versions->Add(new wxStaticText(this, wxID_ANY, ver_online.to_string())); - content_sizer->Add(versions); + //B44 + m_vebview_release_note = CreateTipView(this); + m_vebview_release_note->SetBackgroundColour(wxColour(0x00, 0x00, 0x00)); + m_vebview_release_note->SetSize(wxSize(FromDIP(800), FromDIP(430))); + m_vebview_release_note->SetMinSize(wxSize(FromDIP(800), FromDIP(430))); + m_vebview_release_note->LoadURL(from_u8("https://github.com/QIDITECH/QIDISlicer/releases/tag/V" + ver_online.to_string())); + + content_sizer->Add(m_vebview_release_note, 1, wxEXPAND); content_sizer->AddSpacer(VERT_SPACING); if(!from_user) { @@ -110,9 +116,8 @@ AppUpdateAvailableDialog::AppUpdateAvailableDialog(const Semver& ver_current, co content_sizer->Add(cbox); } content_sizer->AddSpacer(VERT_SPACING); - - AUAD_size = content_sizer->GetSize(); - + AUAD_size = wxSize(850, 500); + content_sizer->SetMinSize(AppUpdateAvailableDialog::AUAD_size); add_button(wxID_CANCEL); @@ -126,6 +131,15 @@ AppUpdateAvailableDialog::AppUpdateAvailableDialog(const Semver& ver_current, co AppUpdateAvailableDialog::~AppUpdateAvailableDialog() {} +//B44 +wxWebView *AppUpdateAvailableDialog::CreateTipView(wxWindow *parent) +{ + wxWebView *tipView = WebView::CreateWebView(parent, ""); + return tipView; +} + + + bool AppUpdateAvailableDialog::disable_version_check() const { if (!cbox) diff --git a/src/slic3r/GUI/UpdateDialogs.hpp b/src/slic3r/GUI/UpdateDialogs.hpp index deedd9a..5e2e50d 100644 --- a/src/slic3r/GUI/UpdateDialogs.hpp +++ b/src/slic3r/GUI/UpdateDialogs.hpp @@ -11,6 +11,10 @@ #include "libslic3r/Semver.hpp" #include "MsgDialog.hpp" +//B44 +#include + + class wxBoxSizer; class wxCheckBox; @@ -49,6 +53,11 @@ public: AppUpdateAvailableDialog& operator=(const AppUpdateAvailableDialog&) = delete; virtual ~AppUpdateAvailableDialog(); + + // B44 + wxWebView *CreateTipView(wxWindow *parent); + wxWebView *m_vebview_release_note{nullptr}; + // Tells whether the user checked the "don't bother me again" checkbox bool disable_version_check() const; static wxSize AUAD_size;