FIX: use wxDialog instead

jira: [STUDIO-12440]
Change-Id: I812e401fa46ba803bfc27b5c498b9d576e663173
(cherry picked from commit f02ef821166abf133036835575f6c71a39faa350)
This commit is contained in:
xin.zhang
2025-05-28 21:05:23 +08:00
committed by Noisyfox
parent e42556f835
commit 33891e4ddc
3 changed files with 4 additions and 15 deletions

View File

@@ -20,7 +20,7 @@
namespace Slic3r { namespace GUI {
uiAmsPercentHumidityDryPopup::uiAmsPercentHumidityDryPopup(wxWindow *parent)
: PopupWindow(parent, wxBORDER_NONE)
: wxDialog(parent, wxID_ANY, "")
{
Create();
}
@@ -42,14 +42,9 @@ void uiAmsPercentHumidityDryPopup::Create()
title->SetBackgroundColour(*wxWHITE);
title->SetFont(Label::Head_18);
m_close_btn = new ScalableButton(this, wxID_ANY, "hum_popup_close");
m_close_btn->SetBackgroundColour(*wxWHITE);
m_close_btn->Bind(wxEVT_LEFT_UP, [this](auto& e) { Dismiss(); e.Skip(); });
title_sizer->AddStretchSpacer();
title_sizer->Add(title, 0, wxALIGN_CENTER_HORIZONTAL);
title_sizer->AddStretchSpacer();
title_sizer->Add(m_close_btn, 0, wxALIGN_RIGHT, 0);
title_sizer->AddSpacer(FromDIP(10));
// create humidity image
m_humidity_img = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap);
@@ -173,7 +168,6 @@ void uiAmsPercentHumidityDryPopup::msw_rescale()
{
idle_img.msw_rescale();
drying_img.msw_rescale();
m_close_btn->msw_rescale();
UpdateContents();
}