Commit graph

74993 commits

Author SHA1 Message Date
Maarten Bent
d215181c38
Add lexilla to wx-config --libs in static build
Fixes #23643
2023-06-17 15:13:03 +02:00
Maarten Bent
47041389f5
CMake: Don't show warning when webkit2 4.1 cannot be found
It will still show a warning when webkit2 4.00 can also not be found.

See #23633
2023-06-17 15:13:02 +02:00
Vadim Zeitlin
f88c9b7fb7 Make wxWindowMSW::TranslateBorder() non-virtual
It doesn't seem like it is meant to be overridden, so don't imply that
it should be possible to do it and make it non-virtual.

Also rename to DoTranslateBorder() to make it more clear that this is a
private function and not part of the public API.

Finally, improve its comment and never return wxBORDER_THEME from this
functions if themes support is off.
2023-06-16 16:22:40 +01:00
Vadim Zeitlin
f5dd5eaf19 Use darker border in wxMSW dark mode by default
The default wxBORDER_SUNKEN uses 2px border and one of those pixels is
white, which is too light in the dark mode, so don't use it by default.

See #23622.
2023-06-16 16:10:52 +01:00
Vadim Zeitlin
4f54919bda Remove overridden wxWindowMSW::GetDefaultBorder()
It simply called the base class function, so just don't override it in
the first place.

No real changes.
2023-06-16 15:55:59 +01:00
Vadim Zeitlin
a89577e8a4 Deprecate useless wxWindow::GetDefaultBorderForControl()
This function was added back in a047aff270 (Added wxBORDER_THEME,
wxWindow::GetDefaultBorderForControl(), wxWindow::CanApplyThemeBorder(),
2007-08-07) but seems to have been made completely unnecessary by
dc797d8e1b (More border rationalisation. GetDefaultBorder is now mostly
defined in base class files., 2007-11-13) soon afterwards and never did
anything other than returning wxBORDER_THEME, with no explanation as to
when it might be useful to override it not to do it.

It also doesn't seem to be really used anywhere outside wxWidgets and
has never been documented, so make it non-virtual and deprecate it to
avoid confusion and simplify things.
2023-06-16 15:55:35 +01:00
Vadim Zeitlin
f50fb719e8 Merge branch 'samples-mfc-update' of https://github.com/wsu-cb/wxWidgets
Fix build and behaviour of the MFC sample.

See #23574.
2023-06-16 00:02:43 +02:00
PB
81ce7edb75 Improve documentation about parallel builds with MinGW makefile
In the note about building wxWidgets with MinGW makefile and using
parallel build, explain that "-jN" option cannot be used when building
"setup_h" target.

Closes #23642.
2023-06-16 00:01:39 +02:00
Maarten Bent
11ee5b4df5 Only draw selection rectangle for selected items in wxVListBox
Closes #22562.

Closes #23641.
2023-06-15 23:57:41 +02:00
Hartwig Wiesmann
f8af562b20 Avoid spurious clang "undeclared selector" warnings
We check that the selector is really supported before using it, so
suppress the unwanted warnings about doing this.

Closes #23639.
2023-06-15 23:55:51 +02:00
Hartwig Wiesmann
837382510d Avoid using invalid column index in wxOSX wxDataViewCtrl
We need to check for the column row to avoid generating an event with an
invalid index, which may result in a crash in the application code.

Closes #23636.
2023-06-15 23:50:07 +02:00
Vadim Zeitlin
5cef6223c3 Merge branch 'cmake-imported-libs' of https://github.com/MaartenBent/wxWidgets
CMake: Improve finding library name or path of imported targets.

See #23635.
2023-06-15 23:47:44 +02:00
Vadim Zeitlin
d78399dcc9 Merge branch 'webkit2_support_4.1' of https://github.com/swt2c/wxWidgets
Add support for building WebView with libwebkit2gtk-4.1.

See #23633.
2023-06-15 23:42:11 +02:00
Scott Talbert
411e183cd0 Switch Fedora CI to use libwebkit2gtk-4.1 2023-06-13 18:14:04 -04:00
Scott Talbert
1b86644266 Add support for building WebView with libwebkit2gtk-4.1
libwebkit2gtk-4.1 has the same API as libwebkit2gtk-4.0, except that the
former links with libsoup-3.0 and the latter links with libsoup-2.4.

Fixes #23630.
2023-06-13 18:13:59 -04:00
Maarten Bent
0f1f61a9c8
CMake: Improve finding library name or path of imported targets
Checking LOCATION{_CONFIG} property on interfaces is only supported since CMake 3.19.
Also check the LOCATION and IMPORTED_LIBNAME properties for possible library locations.

Fixes #23632
2023-06-13 21:22:44 +02:00
Maarten Bent
e1f0a938f6
CMake: Fix using Cotire for precompiled headers
Cotire doesn't work when $<COMPILE_LANGUAGE:CXX> is used.
2023-06-13 21:19:44 +02:00
Vadim Zeitlin
d7a98a44ea Fix compilation of wxUILocale with glibc < 2.27
The _NL_WALTMON_xxx constants used since 5b424ea181 (Add wxUILocale
methods for getting month and day names, 2023-05-24) are only available
in glibc 2.27 or later.

See #23191.
2023-06-12 23:06:20 +02:00
Vadim Zeitlin
2b6be286ee Fix using generated wx-config in CMake builds
Since 1c64bd506c (Use grep instead of fgrep and egrep, 2023-05-10) EGREP
wasn't defined in CMake build any longer, so finding the correct config
script always failed.

Fix this by using "grep -E" directly instead of "$EGREP".
2023-06-12 20:46:57 +02:00
Bill Su
7420ab1b26 wxMFCApp::PreTranslateMessage: Give msg to MFC before wxWidgets
because wxWidgets wxGUIEventLoop::PreProcessMessage() seems to
always report that it has consumed msg.

fix #23574
2023-06-11 01:56:21 -04:00
Bill Su
6ab144f9bf samples/mfc: disable composition to allow wxClientDC to work 2023-06-11 01:56:21 -04:00
Bill Su
6b1683757f samples/mfc: building with UNICODE requires wide strings 2023-06-11 01:56:21 -04:00
Bill Su
d970c8eeae samples/mfc: needs #define UNICODE
The header-order workaround for WINVER should also be used for
UNICODE and _UNICODE
2023-06-11 01:56:21 -04:00
Vadim Zeitlin
27aa7e90a7 Merge branch 'gtk-fixes-textctrl' of https://github.com/dsa-t/wxWidgets
Really fix wxTextCtrl size computation in wxGTK and improve
wxTreeTextCtrl positioning in wxTreeCtrl.

See #23001.

Closes #23610.

See #23623.
2023-06-10 17:09:53 +02:00
Richard Powell
6c35c708d5 Fix -Wdeprecated-copy warnings when building in C++20 mode
Avoid implicit copy constructor warnings by using
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN_DEF_COPY/wxDECLARE_NO_ASSIGN_DEF_COPY
instead of wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN.

Closes #23625.

Closes #23626.
2023-06-10 17:02:13 +02:00
matyalatte
c8fcb0be8f Fix a linker error when wxUSE_PROTOCOL_FILE is off
Fix a linker error for wxProtocolUsewxFileProto when wxUSE_PROTOCOL_FILE
is off but wxUSE_PROTOCOL is on.

Closes #23629.
2023-06-10 17:00:09 +02:00
Alex Shvartzkop
210884ac52 Better positioning for wxTreeTextCtrl. 2023-06-09 18:24:50 +03:00
Alex Shvartzkop
17b72d372f Use calculated margins in wxTextCtrl::DoGetSizeFromTextSize
instead of hardcoded for single-line controls.
2023-06-08 22:04:20 +03:00
Alex Shvartzkop
f9eea9fdfd Gets rid of gtk_entry_get_layout_offsets in GTKGetEntryMargins
due to returning invalid values when used before size_allocate.

Using padding + border on GTK3 and thickness + inner border on GTK2
looks correct.
2023-06-08 21:28:12 +03:00
Vadim Zeitlin
58c49d06fa Minor updates to wxUIActionSimulator documentation
Don't say that it's experimental in configure but do mention that it
doesn't work under Wayland.

Closes #23619.
2023-06-08 01:26:16 +02:00
Tobias Taschner
db09adf6b5 Include macOS 14 name in wxGetOsDescription()
Recognize macOS Sonoma too.

Closes #23615.
2023-06-06 21:20:00 +02:00
Maarten Bent
a801057f1a CMake: Check and enable use of libxkbcommon
CMake's has built-in support for checking xkbcommon using FindX11 since
3.18.

But because older CMake versions are supported, add our own module that
checks if the header and library is available.

See #23410.

Closes #23613.
2023-06-06 21:18:48 +02:00
PB
241ed70b5b Copy all data files needed by XRC sample when building with CMake
XPM files demonstrating the use of wxBitmapBundle in the XRC files
were not copied when building the XRC sample with CMake.

This should have been part of eaa769a (Use wxBitmapBundle in
wxBitmapComboBox XRC handler, 2022-02-09).

Closes #23612.
2023-06-06 21:18:03 +02:00
matyalatte
609b7e2535 Fix compile errors for wxNO_RTTI with some controls disabled
Fix compilation errors when wxNO_RTTI and wxUSE_UIACTIONSIMULATOR are
on, but one or more of wxUSE_COMBOBOX, wxUSE_CHOICE and wxUSE_LISTBOX
are off.

Closes #23611.
2023-06-06 21:16:59 +02:00
Vadim Zeitlin
d80887f302 Merge branch 'listctrl-dark-win11'
Fixes for wxListCtrl drawing under Windows 11 in dark mode and drawing
when using WS_EX_COMPOSITED.

See #23608.
2023-06-05 15:32:58 +02:00
Vadim Zeitlin
4c8ec0ed5d Revert "Add wxWindow::MSWAfterReparent() virtual function"
This reverts commit cd637663c8 (Add wxWindow::MSWAfterReparent() virtual
function, 2022-10-16) and removes wxListCtrl::MSWAfterReparent() added
in ff629f3853 (Fix drawing wxListCtrl since enabling double buffering by
default, 2022-10-16) which is not used any more now.
2023-06-05 14:30:56 +01:00
Brian Nixon
381c39a051 Clear grid attribute cache when loading new table
Clear the cached attributes when replacing the table they were used
with.

Add unit test checking that the attributes are not used any longer.

Closes #23607.
2023-06-05 15:22:49 +02:00
Brian Nixon
567a66aac2 Remove dependency of wxUSE_SOCKETS on wxUSE_STOPWATCH
It isn't actually needed, so don't check for it in wx/chkconf.h and
remove the comment claiming that it is from various setup.h files.

Closes #23609.
2023-06-05 15:13:21 +02:00
Vadim Zeitlin
15e4f5b185 Work around wxListCtrl repainting problems with WS_EX_COMPOSITED
It seems that simply creating wxPaintDC, i.e. calling BeginPaint(),
ourselves and then letting the native control draw into it, disables
whichever optimizations are used by the control that break its drawing
with WS_EX_COMPOSITED, so always do this in our OnPaint(), even if we
don't need to draw anything ourselves.

This allows to avoid disabling WS_EX_COMPOSITED when wxListCtrl is used,
which resulted in horrible flicker before.

See #23585.
2023-06-05 00:55:53 +01:00
Vadim Zeitlin
9710592cc4 Erase unwanted list view separators in dark mode under Windows 11
For some reason, "DarkMode_Explorer" theme started drawing vertical item
separators under Windows 11 even though it did not do this under Windows
10. These separators are unwanted, as they are not shown in the Explorer
list control that we try to emulate, and look ugly because they are
shifted by 1px compared to the separators drawn by the header control
with "ItemsView" theme, which is the only one in which the header looks
right in dark mode.

So explicitly erase everything below the last item when using dark mode
under Windows 11 to get rid of these separators.
2023-06-05 00:55:53 +01:00
Vadim Zeitlin
4cd1483122 Draw all wxListCtrl items ourselves in dark mode
Unfortunately drawing just the selected item ourselves and let the
control draw all the other ones doesn't work too well as the offsets
used for the items differ between Windows versions and so it's difficult
to get them right, but getting them wrong is very noticeable as when
browsing through the control the current item seems to jump because it's
shifted compared to the other ones.

So just draw all the items ourselves: this is not as nice as letting
Windows do it, but it ensures that they use consistent positions.
2023-06-05 00:55:53 +01:00
Vadim Zeitlin
456449bcc1 Support wxWinVersion_11 in the private wxGetWinVersion() helper
This can be more convenient to use than public functions and it's just
better to support all Windows versions in this function too.
2023-06-05 00:55:53 +01:00
Brian Nixon
b9d0541f9a Make wxSocket::Peek() work with UDP too
Fix wxSocketImpl::RecvDgram() when caller requests fewer bytes than
are present in datagram, as we must always read all the available bytes
when using UDP -- they are not buffered by the OS and so won't be
provided by the next Read() call.

Closes #23594.

Closes #23604.
2023-06-05 01:49:41 +02:00
Vadim Zeitlin
5546733c12 Merge branch 'qt-dc-clip' of https://github.com/AliKet/wxWidgets
Fix wxDC and wxGCDC clipping in wxQt.

See #23600.
2023-06-05 01:47:15 +02:00
Vadim Zeitlin
54a2eb1687 Restore setting CRT locale in wxLocale under macOS
This was accidentally broken by the previous changes and the C-level
locale was not set at all any more, even when using wxLocale (and not
just wxUILocale, which is not supposed to set it) under macOS.

Fix this by explicitly calling setlocale() on this platform to restore
the previous, and documented, behaviour.

Closes #23557.

See #23603.
2023-06-05 01:46:27 +02:00
Brian Nixon
b473163da2 Correct delta-RLE bitmap background colour
Use black instead of the first palette colour for the implicit
background for RLE bitmaps for consistency with Windows itself.

Closes #23599.
2023-06-04 00:38:39 +02:00
Vadim Zeitlin
4c94d5d1e5 Merge branch 'dark-statusbar'
Fixes for status bar and dialog grippers appearance in dark mode.

See #23602.
2023-06-03 22:20:32 +01:00
ali kettab
d06c00f466 Remove no longer used code from wxGCDCImpl::DestroyClippingRegion()
None of the major ports need the removed code anyhow. We can always restore it
later if any of the (still) supported ports are affected by this removal.
2023-06-03 20:49:06 +01:00
Brian Nixon
d78e9fb1cb Correct loading of BI_BITFIELDS bitmaps
This fixes several minor bugs in the loading of `BI_BITFIELDS` bitmaps,
related to handling different header sizes and the colour and alpha
masks.

Closes #23601.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
6bba7055aa Exclude descrip.mms files everywhere from the whitespace check
Previously only the top-level one was excluded, but others use TABs too.
2023-06-03 21:07:40 +02:00