mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-07-09 17:14:47 -06:00
Use modified wxWidgets 3.3.0 build for non-Windows platforms
This commit is contained in:
parent
7bf3d6a098
commit
18ea1f22c5
@ -37,11 +37,11 @@ if (ENABLE_VCPKG)
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux")
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
elseif(APPLE)
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_mac")
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_mac;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
else()
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_win;${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports")
|
||||
endif()
|
||||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake"
|
||||
CACHE STRING "Vcpkg toolchain file")
|
||||
|
||||
@ -1,82 +0,0 @@
|
||||
diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp
|
||||
index 3bdb2c5699bf..96225f19f849 100644
|
||||
--- a/src/msw/textctrl.cpp
|
||||
+++ b/src/msw/textctrl.cpp
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <windowsx.h>
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
+#include "wx/msw/private/darkmode.h"
|
||||
#include "wx/msw/winundef.h"
|
||||
|
||||
#include <string.h>
|
||||
@@ -473,9 +474,10 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
if ( !MSWCreateText(value, pos, size) )
|
||||
return false;
|
||||
|
||||
-#if wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT
|
||||
+#if wxUSE_RICHEDIT
|
||||
if ( IsRich() )
|
||||
{
|
||||
+#if wxUSE_DRAG_AND_DROP
|
||||
// rich text controls have a default associated drop target which
|
||||
// allows them to receive (rich) text dropped on them, which is nice,
|
||||
// but prevents us from associating a user-defined drop target with
|
||||
@@ -484,8 +486,16 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
// to make it work, we set m_dropTarget to this special value initially
|
||||
// and check for it in our SetDropTarget()
|
||||
m_dropTarget = wxRICHTEXT_DEFAULT_DROPTARGET;
|
||||
+#endif // wxUSE_DRAG_AND_DROP
|
||||
+
|
||||
+ if ( wxMSWDarkMode::IsActive() )
|
||||
+ {
|
||||
+ // We need to set the colours explicitly for rich text controls.
|
||||
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||
+ SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
||||
+ }
|
||||
}
|
||||
-#endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT
|
||||
+#endif // wxUSE_RICHEDIT
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -501,9 +511,6 @@ bool wxTextCtrl::MSWCreateText(const wxString& value,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size)
|
||||
{
|
||||
- // translate wxWin style flags to MSW ones
|
||||
- WXDWORD msStyle = MSWGetCreateWindowFlags();
|
||||
-
|
||||
// do create the control - either an EDIT or RICHEDIT
|
||||
wxString windowClass = wxT("EDIT");
|
||||
|
||||
@@ -624,7 +631,7 @@ bool wxTextCtrl::MSWCreateText(const wxString& value,
|
||||
// implementation detail
|
||||
m_updatesCount = -2;
|
||||
|
||||
- if ( !MSWCreateControl(windowClass.t_str(), msStyle, pos, size, valueWin) )
|
||||
+ if ( !MSWCreateControl(windowClass.t_str(), valueWin, pos, size) )
|
||||
{
|
||||
// There is one case in which window creation may realistically fail
|
||||
// and this is when we create a plain EDIT control with too long text,
|
||||
@@ -647,6 +654,20 @@ bool wxTextCtrl::MSWCreateText(const wxString& value,
|
||||
#if wxUSE_RICHEDIT
|
||||
if (IsRich())
|
||||
{
|
||||
+ // RICHEDIT50W automatically adds WS_EX_CLIENTEDGE to its style for
|
||||
+ // some reason and while this isn't very noticeable in light mode, it
|
||||
+ // looks really bad in dark mode, so forcibly remove it unless it was
|
||||
+ // explicitly requested.
|
||||
+ if ( GetBorder() != wxBORDER_SUNKEN && wxMSWDarkMode::IsActive() )
|
||||
+ {
|
||||
+ const auto origExStyle = ::GetWindowLongPtr(GetHwnd(), GWL_EXSTYLE);
|
||||
+ if ( origExStyle & WS_EX_CLIENTEDGE )
|
||||
+ {
|
||||
+ ::SetWindowLongPtr(GetHwnd(), GWL_EXSTYLE,
|
||||
+ origExStyle & ~WS_EX_CLIENTEDGE);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
#if wxUSE_INKEDIT
|
||||
if (IsInkEdit())
|
||||
{
|
||||
0
dependencies/vcpkg_overlay_ports_win/.gitkeep
vendored
Normal file
0
dependencies/vcpkg_overlay_ports_win/.gitkeep
vendored
Normal file
Loading…
Reference in New Issue
Block a user