mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-04-06 00:32:05 +02:00
Guard wxToolTip::GetToolTipCtrl() for wx 3.3 and add explicit wx/utils.h includes
- Wrap GetToolTipCtrl() call in GUI_App.cpp with #if wxVERSION_NUMBER < 3300 guard, as this API may not be accessible in wxWidgets 3.3. The dark tooltip theming is cosmetic and non-critical. - Add explicit #include <wx/utils.h> to 7 source files that use functions from that header (wxGetMousePosition, wxLaunchDefaultBrowser, wxGetDisplaySize, wxBell) but relied on transitive includes. This preempts breakage from wxWidgets 3.3 reducing transitive includes. Files with wx/utils.h added: BBLTopbar.cpp, CreatePresetsDialog.cpp, CameraPopup.cpp, GLCanvas3D.cpp, GCodeViewer.cpp, GUI_ObjectList.cpp, FilamentMapPanel.cpp. Skipped BindDialog.cpp and FilamentPickerDialog.cpp as they already include wx/wx.h which provides wx/utils.h transitively. Part of wxWidgets 3.1.5 -> 3.3.2 upgrade.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "wx/artprov.h"
|
||||
#include "wx/aui/framemanager.h"
|
||||
#include "wx/display.h"
|
||||
#include <wx/utils.h>
|
||||
#include "I18N.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include "GUI.hpp"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/dcgraph.h>
|
||||
#include <wx/utils.h>
|
||||
#include "GUI_App.hpp"
|
||||
#include <slic3r/GUI/StatusPanel.hpp>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <wx/dcgraph.h>
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/utils.h>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "I18N.hpp"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "FilamentMapPanel.hpp"
|
||||
#include "GUI_App.hpp"
|
||||
#include <wx/dcbuffer.h>
|
||||
#include <wx/utils.h>
|
||||
#include "wx/graphics.h"
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/numformatter.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
#include <array>
|
||||
#include <algorithm>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
#include <wx/settings.h>
|
||||
#include <wx/tooltip.h>
|
||||
#include <wx/debug.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/fontutil.h>
|
||||
// Print now includes tbb, and tbb includes Windows. This breaks compilation of wxWidgets if included before wx.
|
||||
#include "libslic3r/Print.hpp"
|
||||
|
||||
@@ -4292,8 +4292,10 @@ void GUI_App::force_colors_update()
|
||||
#ifdef _MSW_DARK_MODE
|
||||
#ifdef __WINDOWS__
|
||||
NppDarkMode::SetDarkMode(dark_mode());
|
||||
#if wxVERSION_NUMBER < 3300
|
||||
if (WXHWND wxHWND = wxToolTip::GetToolTipCtrl())
|
||||
NppDarkMode::SetDarkExplorerTheme((HWND)wxHWND);
|
||||
#endif
|
||||
NppDarkMode::SetDarkTitleBar(mainframe->GetHWND());
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <wx/progdlg.h>
|
||||
#include <wx/listbook.h>
|
||||
#include <wx/numformatter.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/headerctrl.h>
|
||||
|
||||
#include "slic3r/Utils/FixModelByWin10.hpp"
|
||||
|
||||
Reference in New Issue
Block a user