mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
fix(wx): add windows c++11 patch
`std::size` too new
This commit is contained in:
2 files changed
+15
No files matched your search
@@ -78,6 +78,8 @@ if(WITH_GUI)
|
|||||||
wxWidgets
|
wxWidgets
|
||||||
GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
|
GIT_REPOSITORY https://github.com/wxWidgets/wxWidgets.git
|
||||||
GIT_SHALLOW ON
|
GIT_SHALLOW ON
|
||||||
|
PATCH_COMMAND
|
||||||
|
patch --forward --ignore-whitespace -p1 < "${CMAKE_SOURCE_DIR}/patches/wxWidgets/0001-cpp11-support.patch" || true
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(wxWidgets)
|
FetchContent_MakeAvailable(wxWidgets)
|
||||||
set(WX_LIBRARIES wxcore wxbase wxnet)
|
set(WX_LIBRARIES wxcore wxbase wxnet)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/msw/taskdlg.cpp b/src/msw/taskdlg.cpp
|
||||||
|
index 7844220405..d3c181029d 100644
|
||||||
|
--- a/src/msw/taskdlg.cpp
|
||||||
|
+++ b/src/msw/taskdlg.cpp
|
||||||
|
@@ -966,7 +966,7 @@ TDRadioButtonSubclassProc(HWND hwnd,
|
||||||
|
::DefSubclassProc(hwnd, WM_PRINTCLIENT, reinterpret_cast<WPARAM>(hdcBuf), PRF_CLIENT);
|
||||||
|
|
||||||
|
wchar_t text[512] = {};
|
||||||
|
- GetWindowTextW(hwnd, text, static_cast<int>(std::size(text)));
|
||||||
|
+ GetWindowTextW(hwnd, text, static_cast<int>(sizeof(text) / sizeof(text[0])));
|
||||||
|
|
||||||
|
auto gs = hBtn.GetTrueSize(BP_RADIOBUTTON, RBS_UNCHECKEDNORMAL);
|
||||||
|
RECT rcText = { gs.x + 2, 0, rcClient.right, rcClient.bottom };
|
||||||
Reference in new issue
Block a user