Commit graph

74882 commits

Author SHA1 Message Date
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
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
Vadim Zeitlin
e95073c24b Merge branch 'init-keyevent-repeat'
Ensure that wxKeyEvent::m_isRepeat is initialized.

See #23596.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
1a1790350f Merge branch 'htmllbox-fix-ub'
Fix undefined behaviour in wxHtmlListBox::OnDrawItem().

See #23595.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
a3e925df0a Merge branch 'mac-uilocale-script-fix'
Locale-related fixes for macOS and new calendar names localization
functions.

Closes #23209.

See #23556.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
946aa6bbc4 Remove redundant "const" from wxItemId conversion operator
This "const" is ignored and just results in a warning from MSVS 17.6.

Closes #23590.
2023-06-03 21:07:40 +02:00
Ian McInerney
5d0c4066d8 Add operators for boolean conversions to wxPGGlobalVars
The old API allowed for users to directly test the variable and find if
it was null, so recreate that API with the new system to preserve
compatibility.

Closes #23445.
2023-06-03 21:07:40 +02:00
Vadim Zeitlin
8f423fc48d Use TABP_PANE constant in wxNotebook code
This constant was already used in wxAuiMSWTabArt, so there are clearly
no problems with using it with the currently supported compilers/SDKs.

No real changes.
2023-06-03 19:18:57 +01:00
Vadim Zeitlin
b7c89669ba Draw wxStatusBar gripper ourselves in dark mode
The "ExplorerStatusBar" theme used to make the rest of the status bar
appear (almost) correctly in dark mode doesn't seem to define SP_GRIPPER
at all and doesn't draw it, so handle WM_PAINT and draw the gripper
ourselves using "Status" theme, which looks fine in dark mode too.
2023-06-03 19:18:57 +01:00
Vadim Zeitlin
0e3f010eec Add wxUxThemeHandle::GetTrueSize() and GetDrawSize() helpers
These functions are more convenient to use and, arguably, more clear to
read than calls to ::GetThemePartSize(), so add these wrappers and
replace most of the uses of the Win32 function with them.

This shouldn't result in any real changes to behaviour.
2023-06-03 19:18:57 +01:00
Vadim Zeitlin
ef93da3160 Add wxUxThemeHandle::DrawBackground() wrapper and use it
This is sightly shorter/more convenient to use than providing all the
parameters to ::DrawThemeBackground() every time.

Similarly to ca5f244f15 (Add wxUxThemeHandle::GetColour() replacing
MSWGetThemeColour(), 2022-12-09), this is just a refactoring which
shouldn't result in any changes in behaviour.
2023-06-03 19:18:57 +01:00
Vadim Zeitlin
259a487475 Add support for getting theme data for non-default DPI too
Use OpenThemeDataForDpi() if necessary to retrieve the correct metrics
values for non-default DPI.

Change the existing wxUxThemeHandle ctor taking wxWindow to use the
window DPI automatically and replace the ctor taking HWND with a pair of
functions either explicitly specifying the DPI or indicating that it is
not used -- the latter can be useful to avoid unnecessary complications
when the theme is only used to retrieve some colour values that don't
depend on the DPI anyhow.

Also make wxUxThemeHandle class movable as a side, but possibly useful,
effect of these changes.
2023-06-03 19:18:57 +01:00
Vadim Zeitlin
d6ec8ea1ea Use wxUxThemeHandle overload taking wxWindow in menu drawing code
This is simpler than calling GetHwndOf() in the caller, but otherwise
does exactly the same thing right now.
2023-06-03 19:18:56 +01:00