Commit graph

75059 commits

Author SHA1 Message Date
Vadim Zeitlin
d30649c381 Add mailmap entry for Hans Mackowiak
One of Hans's commits somehow used a wrong email.
2023-08-25 17:23:38 +02:00
Vadim Zeitlin
d69ddb8656 Revert all recent wxUSE_DPI_AWARE_MANIFEST-related changes
This reverts 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23) and all the commits which tried to
fix the breakage caused by it.

While the original change had merit, it seems to be too difficult to fix
all our build systems to avoid embedding manifest when defining this in
the code, like samples/sample.rc does, so revert this change for now.

Maybe it can be reintroduced in the future after switching to some other
build system.
2023-08-25 00:03:47 +02:00
Vadim Zeitlin
1d50fa5207 Merge branch 'cmake-manifest' of https://github.com/MaartenBent/wxWidgets
Really fix CMake build after the changes of 5d630caabd (Make it enough
to predefine only wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).

See #23810.
2023-08-24 17:25:50 +02:00
Vadim Zeitlin
a56219532e Don't embed manifest in GUI test MSVS project neither
This is similar to f6255e456b (Don't embed default manifest in minimal
samples MSVC project, 2023-08-24) but for the GUI test, which was also
broken by 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).
2023-08-24 17:24:07 +02:00
Maarten Bent
38504acac6
Don't ignore CMake files for msw clang build in CI 2023-08-24 16:28:39 +02:00
Maarten Bent
026528f861
Fix CMake build issues after enabling manifest from rc file 2023-08-24 16:26:47 +02:00
PB
10d09ec2b2 Remove outdated parts from build system
Remove support for unsupported MSVS versions earlier than 2015
and Windows versions earlier than 7 from CMake build as they are not
supported any longer.

Also update wxUSE_GRAPHICS_GDIPLUS and wxUSE_GRAPHICS_DIRECT2D comments
in wxMSW setup.h to remove mentions of unsupported Windows XP but do
mention that MinGW-w64 can use Direct2D.

Closes #23787.
2023-08-24 15:15:57 +02:00
PB
811df1e2b0 Update maximum supported compiler versions in main readme
Update maximum supported versions for gcc and clang in the
main readme.

Closes #23792.
2023-08-24 15:05:03 +02:00
Vadim Zeitlin
e6ad7bc077 Fix non-breakable spaces accidentally committed in parent commit
Replace them with normal spaces to prevent CMake from giving an
incomprehensible error.
2023-08-24 13:25:29 +02:00
Maarten Bent
570af08ea1 Fix manifest in MSW CMake build after recent changes
Don't embed the manifests explicitly when wxUSE_DPI_AWARE_MANIFEST is
set any more, as this is done by wx/msw/wx.rc after the changes of
5d630caabd (Make it enough to predefine only wxUSE_DPI_AWARE_MANIFEST,
2023-08-23).
2023-08-24 13:09:13 +02:00
Paul Cornett
496a9a40a1 Avoid division-by-zero in wxImage::Paste()
See #23791
2023-08-23 23:03:43 -07:00
Vadim Zeitlin
f6255e456b Don't embed default manifest in minimal samples MSVC project
This clashes with the wx manifest which is getting included now after
the changes of 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).
2023-08-24 03:28:12 +02:00
Vadim Zeitlin
45dc55b047 Merge branch 'wxrc-multi-bitmap'
Support multiple bitmaps in <bitmap> elements in wxrc.

See #23795.
2023-08-24 02:51:51 +02:00
Vadim Zeitlin
55c704a1b4 Pin httpbin to the previously working 0.7.0 version
The recently released 0.10.0 doesn't seem to have any actual changes but
has new dependencies which broke the previously working builds.

Closes #23800.
2023-08-24 02:51:16 +02:00
Samuel Thibault
62f75c235d Fix DynamicLibrary::Load() test for less common platforms
alpha and ia64 use libc.so.6.1, GNU/kFreeBSD uses libc.so.0.1, and
GNU/Hurd uses libc.so.0.3, so check for these versions too in addition
to 6 and 7 used under x86 Linux.

Closes #23801.
2023-08-24 02:49:31 +02:00
PB
547d49f68b Fix typo in wxColourDialog documentation
The code example in wxColourDialog documentation used
a wrong type to create wxColourDialog instance.

Closes #23793.

Closes #23794.
2023-08-24 02:42:39 +02:00
PB
af453674b6 Improve wxFileSystem::AddHandler() documentation
The note in the method description incorrectly stated that
"...the handlers are deleted in wxFileSystem's destructor so
that you don't have to care about it." However, unless a
handler is removed by calling wxFileSystem::RemoveHandler()
(or undocumented wxFileSystem::CleanUpHandlers()), it is deleted
only when wxWidgets shuts down in wxFileSystemModule::OnExit().

Update the method documentation that it is correct (and similar to
that of wxImage::AddHandler()).

Closes #23789.
2023-08-24 02:38:51 +02:00
Kvaz1r
d282cc9657 Fix creating wxRadioBox with no items in wxUniv
Don't select the first item if there are no items at all.

Closes #23784.
2023-08-24 02:31:22 +02:00
Carlo Bramini
15d7aaaa50 Fix wxLocale::GetInfo() unit test under Cygwin
Use the French date format expected by Cygwin CRT which differs from the
one used by MSVC.

Closes #23782.
2023-08-24 02:25:25 +02:00
Carlo Bramini
1bc8631b52 Fix DynamicLibrary::Load unit test under Cygwin
While running the test_base on CYGWIN, this message will be printed on the console:

-------------------------------------------------------------------------------
DynamicLibrary::Load
-------------------------------------------------------------------------------
/cygdrive/c/Users/carlo/Documents/GitHub/wxWidgets/tests/misc/dynamiclib.cpp:26
...............................................................................

/cygdrive/c/Users/carlo/Documents/GitHub/wxWidgets/tests/misc/dynamiclib.cpp:80: warning:
  Couldn't find libc.so, skipping DynamicLibrary::Load() test.

/cygdrive/c/Users/carlo/Documents/GitHub/wxWidgets/tests/misc/dynamiclib.cpp:84: warning:
  Possible candidates:
  /lib/libc.a
  /usr/lib/libc.a

CYGWIN uses NEWLIB as C library and it is compiled into cygwin1.dll.
This patch adds the right test case for CYGWIN, for letting the execution of the test.

Closes #23781.
2023-08-24 02:24:16 +02:00
PB
61bae154d3 Improve samples appearance in dark mode
- caret: Use the system color for window background instead of
  hard-coded white.

- image: Use hard-coded black for the text drawing since all other
  drawings on the image canvas use hard-coded colours too. The default
  text colour was barely readable in dark mode.

- joytest: Use wxCYAN_PEN instead of wxBLACK_PEN to ensure the line is
  visible both in light and dark colour system mode.

- ownerdrw: Use such background colour that there is good contrast
  between text and background both in light and dark colour system mode.

- popup: Use such background colour for the pop up so that there is a
  good contrast between text and background both in light and dark
  colour system mode.

Closes #23773.
2023-08-24 02:22:19 +02:00
Vadim Zeitlin
9e8ab658fe Add MSVS 2022 solution file for wxrc too
Add another manually created solution file, after adding the solutions
for MSVS 2017 and 2019 in cfe4a10995 (Add manually created MSVS 201x
solutions files for wxrc, 2019-01-07) to make it possible to build wxrc
with MSVS 2022 easily too.
2023-08-23 23:24:40 +02:00
PB
9536583c0f Improve the combo sample
In the dialog, create the controls put in the static box sizer
with the sizer's static box as the parent instead of the dialog.

Improve appearance of custom drawn items in dark mode.

Closes #23765.
2023-08-23 23:08:52 +02:00
PB
ecd01698e7 Document more MSW dark mode limitations
Add that anything using task dialog does not support dark mode.

Mention that most common dialogs do not support dark mode.

Mention that calling wxMenu::Break() will turn the menu light.

Closes #23769.
2023-08-23 23:08:15 +02:00
Vadim Zeitlin
ab88fecdc5 Add support for multi-resolution bitmaps to wxrc
Handle multiple semicolon-separated paths in <bitmap> elements which are
used to provide several versions of the same bitmap in different
resolutions.

This commit is best viewed ignoring whitespace-only changes.
2023-08-23 18:03:03 +02:00
Vadim Zeitlin
13d8adb4e1 Improve error reporting for IO errors in wxrc
Notably, give a clear error if an input file is not found and also check
that the temporary output file could have been written successfully.

Still continue handling the other files even if some of them couldn't be
found in order to give all errors at once if there is more than one
missing file.
2023-08-23 17:58:48 +02:00
Vadim Zeitlin
5d630caabd Make it enough to predefine only wxUSE_DPI_AWARE_MANIFEST
If this is predefined before including wx/msw/wx.rc, it clearly
indicates that wx manifest should be used, but this was _not_ the case
before as wxUSE_RC_MANIFEST could be predefined as 0 (which is the case
for MSVS, to avoid conflicting with the manifest embedded by it into the
executable by default).

Change this and do include the wx manifest if wxUSE_DPI_AWARE_MANIFEST
is defined.
2023-08-23 16:18:05 +02:00
Lauri Nurmi
3e4946fc31 Minor documentation syntax and orthography fixes
Closes #23759.
2023-08-22 19:20:33 +02:00
Scott Talbert
3ae3a4e1f5
Support using Numpad Enter for ending wxListCtrl editing (#23762)
Fixes #23761.
2023-08-12 16:04:26 -07:00
Paul Cornett
55d0b594ff Avoid division-by-zero when vertical scrollbar is disabled
See #23763
2023-08-12 15:54:39 -07:00
Maarten Bent
d847f3b039
Fix position of label window in wxStaticBox after DPI change
Fixes #23740
2023-08-05 21:54:01 +02:00
Vadim Zeitlin
a4dec24c6d Mention behaviour change of wxDC::GetContentScaleFactor()
Complete changes of 5e7b08f9ea (Correct wxDC::GetContentScaleFactor()
documentation, 2023-04-13) to add the information about the version in
which the behaviour of this function changed, as it was already done in
the version of this commit cherry picked to 3.2 branch, i.e. 8094ed5795
(Correct wxDC::GetContentScaleFactor() documentation, 2023-04-13).

Closes #23748.
2023-08-02 04:08:13 +02:00
Vadim Zeitlin
a42d9181d6 Define LOCALE_RETURN_GENITIVE_NAMES for old MinGW support
Some (very) old MinGW versions, such as 5.3.0 used on AppVeyor CI for
3.2 builds, don't provide the definition of this constant, so do it
ourselves.

See #23747.
2023-08-02 04:08:05 +02:00
Vadim Zeitlin
104b178cd7 Merge branch 'enable-stc-test'
Enable wxSTC tests in static builds too after fixing the problems
preventing them from linking there.

See #23744.
2023-08-01 01:35:10 +02:00
PB
350222e411 Correct wxBUILD_TESTS CMake build options in unit tests docs
Provide the correct options for wxBUILD_TESTS in the CMake part
of unit tests documentation.

Closes #23745.
2023-07-31 19:18:18 +02:00
Vadim Zeitlin
ec4777bbbf Rebake after the previous commit
This just separates the automatically-generated changes from the manual
ones in the parent commit.
2023-07-29 18:13:29 +02:00
Vadim Zeitlin
d509d534dd Don't define LIB_LEXILLA and LIB_SCINTILLA when USE_STC==0
This avoids link when building the tests in configure-based CI builds
using --disable-stc.
2023-07-29 18:12:09 +02:00
Vadim Zeitlin
7d362c3fca Enable wxStyledTextCtrl unit test in static builds too
It should link there too now after the previous commits.
2023-07-29 16:01:33 +02:00
Vadim Zeitlin
994bbe51a7 Link with stc directly in the test bakefile
There doesn't seem any reason not to do it, so do the same thing as is
done in the stc sample and which seems to work there.
2023-07-29 16:01:33 +02:00
Vadim Zeitlin
a44fe10e32 Link with Scintilla libs in the MSVS test project
They are required by wxStyledTextCtrl tests.
2023-07-29 16:01:33 +02:00
Vadim Zeitlin
e8fdb66741 Merge branch 'improve-configure'
Modernize configure.

See #23730.
2023-07-28 13:25:52 +02:00
Stefan Csomor
30fbb94053 Send key down events ourselves if macOS didn't do it
Set a flag in insertText and send wxEVT_KEY_DOWN ourselves from
DoHandleKeyEvent() if it wasn't set to ensure that we generate these
events for the keys ignored by the standard insertText, such as
⌘+⎇+Letter combination.

Closes #23671.

See #23699.
2023-07-28 13:24:51 +02:00
Vadim Zeitlin
e38bc95548 Synchronize config.* files in submodules with top-level repository
Use the same versions of config.{guess,sub} in the submodules where they
are used (so not in src/{jpeg,png}) as in wx itself to avoid any
confusion due to using different architecture names in the main
configure and subconfigure (e.g. aarch64-apple and arm-apple for M1).

Closes #23739.
2023-07-27 17:14:48 +02:00
Vadim Zeitlin
703d815ef8 Make configure message for zlib consistent with the other ones
All the other messages use "system $LIBRARY not found", and just zlib
didn't use "system" for some reason -- add it now so that the messages
are consistent when several of them are given.

This is a purely cosmetic changes.
2023-07-24 18:18:05 +02:00
Vadim Zeitlin
f03ea82be8 Merge branch 'im/stringview' of https://github.com/imciner2/wxWidgets
Add std::string_view constructors to wxString.

Also improve C++17 standard headers detection for MSVS.

See #23711.
2023-07-24 18:16:39 +02:00
Ian McInerney
b8d3b37c9e Add new macro for standard library header inclusion
Newer standard library headers should only be included when the compiler
is targetting that standard, otherwise some compilers (like MSVC) will
warn that you are using a newer C++ include on an older version.
2023-07-24 16:54:14 +01:00
Vadim Zeitlin
414140113c Merge remote-tracking branch 'github/egl-wayland-perf-fix'
Fix wxGLCanvas performance when using Wayland.

See #23554.
2023-07-24 17:41:35 +02:00
Vadim Zeitlin
0436cebd82 Fix recently broken assert for virtual wxGenericListCtrl
The changes of 8c1234ea66 (Improve assert checking line index validity
in wxGenericListCtrl, 2023-07-24) were wrong for virtual list controls
as the lines vector is not used for them, so restrict the assert to the
non-virtual case only.
2023-07-24 15:23:40 +02:00
Vadim Zeitlin
66cb7089f8 Add logging to wxGTK wxTopLevelWindow size-related functions
This can be helpful when debugging size-related problems and doesn't do
any harm as long as the corresponding tracing category is disabled.
2023-07-24 14:04:56 +02:00
Vadim Zeitlin
08c3d09e51 Avoid debug warnings when defocusing menu bar in wxGTK
At least under Wayland, removing focus from the menu consistently
results in "window lost focus even though it didn't have it" debug
messages because wxMenuBar never gets any focus-in signals but does get
focus-out one.

Avoid this by just not connecting handlers for these signals at all, as
we don't need them for wxMenuBar which isn't supposed to generate any
focus events anyhow.

See #23726.
2023-07-24 14:04:36 +02:00