From ab49516ec17079a589a68dc0914743f71ae106f8 Mon Sep 17 00:00:00 2001 From: Tao Wang Date: Sat, 26 Nov 2022 12:52:06 +0800 Subject: [PATCH] FIX:fixed popup wrong pos of the print menu on multiple displays Change-Id: I9712244df4e0df9dcb5beedf4dd36e3a06fa9db6 --- src/slic3r/GUI/Widgets/SideMenuPopup.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Widgets/SideMenuPopup.cpp b/src/slic3r/GUI/Widgets/SideMenuPopup.cpp index 0b6b22b38..083d02978 100644 --- a/src/slic3r/GUI/Widgets/SideMenuPopup.cpp +++ b/src/slic3r/GUI/Widgets/SideMenuPopup.cpp @@ -42,8 +42,12 @@ bool SidePopup::Show( bool show ) void SidePopup::Popup(wxWindow* focus) { Create(); - int screenwidth = wxSystemSettings::GetMetric(wxSYS_SCREEN_X,NULL); + auto drect = wxDisplay(GetParent()).GetGeometry(); + int screenwidth = drect.x + drect.width; + //int screenwidth = wxSystemSettings::GetMetric(wxSYS_SCREEN_X,NULL); + int max_width = 0; + for (auto btn : btn_list) { max_width = std::max(btn->GetMinSize().x, max_width);