fix(stable): wx 3.3 private Header kopieren + GetToolTipCtrl-Guard

- deps/wxWidgets: copy_private_headers-Step ergänzt (markuptext.h,
  jsscriptwrapper.h etc. fehlen im wx-3.3-cmake-Install)
- GUI_App: wxToolTip::GetToolTipCtrl() ist in wx 3.3 private -> mit
  wxVERSION_NUMBER < 3300 guarden (wie 2.4)
This commit is contained in:
thysson2701
2026-06-12 21:28:15 +02:00
parent 64801faff3
commit 7658e1df81
2 changed files with 25 additions and 0 deletions

View File

@@ -68,6 +68,28 @@ orcaslicer_add_cmake_project(
-DwxUSE_EXPAT=sys
)
# wxWidgets 3.3 cmake install doesn't include private headers.
# OrcaSlicer uses some of the private headers (markuptext, jsscriptwrapper,
# accessibility support). Copy the private headers directory after install.
if(MSVC)
set(_wx_inc_dest ${DESTDIR}/include/wx)
else()
set(_wx_inc_dest ${DESTDIR}/include/wx-3.3/wx)
endif()
ExternalProject_Add_Step(dep_wxWidgets copy_private_headers
DEPENDEES install
COMMENT "Copying wxWidgets private headers"
COMMAND ${CMAKE_COMMAND} -E copy_directory
<SOURCE_DIR>/include/wx/private
${_wx_inc_dest}/private
COMMAND ${CMAKE_COMMAND} -E copy_directory
<SOURCE_DIR>/include/wx/generic/private
${_wx_inc_dest}/generic/private
COMMAND ${CMAKE_COMMAND} -E copy_directory
<SOURCE_DIR>/include/wx/gtk/private
${_wx_inc_dest}/gtk/private
)
if (MSVC)
add_debug_dep(dep_wxWidgets)
endif ()

View File

@@ -4313,8 +4313,11 @@ void GUI_App::force_colors_update()
#ifdef _MSW_DARK_MODE
#ifdef __WINDOWS__
NppDarkMode::SetDarkMode(dark_mode());
#if wxVERSION_NUMBER < 3300
// wxToolTip::GetToolTipCtrl() became private in wxWidgets 3.3.
if (WXHWND wxHWND = wxToolTip::GetToolTipCtrl())
NppDarkMode::SetDarkExplorerTheme((HWND)wxHWND);
#endif
NppDarkMode::SetDarkTitleBar(mainframe->GetHWND());