Commit Graph

71487 Commits

Author SHA1 Message Date
Vadim Zeitlin
b192f3656d Merge branch 'makefiles-arch-suffix'
Use arch suffix consistently in all directories names in MSVC project
and make-files.

See https://github.com/wxWidgets/wxWidgets/pull/2498
2021-08-27 17:59:33 +02:00
Vadim Zeitlin
a3b8620613 Merge branch 'msvs-sln-deps'
Fix xrc dependency on html and cleanup adv dependencies too.

See https://github.com/wxWidgets/wxWidgets/pull/2500
2021-08-27 17:59:09 +02:00
Vadim Zeitlin
f27c63c16d Remove dependencies on "adv" library in MSVS solutions
This library doesn't really exist any more and is preserved only for
compatibility, there is no need to have dependencies on it, just depend
on "core" instead.
2021-08-27 14:47:44 +01:00
Vadim Zeitlin
3462e9bcc4 Add dependency of xrc library on html one in MSVS solutions
This fixes sporadic errors when building DLL configurations as the html
library build could have been still in progress when xrc library,
requiring it, was linked.
2021-08-27 14:06:42 +01:00
Vadim Zeitlin
5d9e29b006 Update AppVeyor test script after the last commit
Use correct path for the tests binaries.
2021-08-27 14:28:07 +02:00
Vadim Zeitlin
de4956680f Merge branch 'mac-cache-fonts'
Optimize creation of standard fonts in wxOSX by caching them.

See https://github.com/wxWidgets/wxWidgets/pull/2499
2021-08-27 14:24:49 +02:00
Vadim Zeitlin
fbc6462375 Fix a gcc warning introduced by the previous commit
Reverting the commits broke indentation, which resulted in
-Wmisleading-indentation from (recent) gcc, so fix it by indenting the
restored "if" properly.

See #13130.
2021-08-26 23:12:56 +01:00
Vadim Zeitlin
046fde8580 Use non-deprecated CTFontUIFontType constants
Use "new" (available since 10.5, for most part) values of the enum
instead of the deprecated ones, which are still defined, but might not
be in the future.

No real changes.
2021-08-27 00:08:18 +02:00
Vadim Zeitlin
27047eb338 Cache system fonts in wxOSX
Call CTFontCreateUIFontForLanguage() only once for every
CTFontUIFontType value and cache the results, as it is expensive to do
it every time wxSystemSettings::GetFont() is called.

Closes #19191.

This commit is best viewed ignoring whitespace-only changes.
2021-08-27 00:04:42 +02:00
Vadim Zeitlin
051418ac00 Fix recent wxMSW buttons with bitmaps appearance regression
Revert both 53eff92ea7 (Call AdjustForBitmapMargins() only once in
wxAnyButton, 2021-04-24), which was completely wrong and was due to not
reading the code attentively enough, and the subsequent 5d508b6e6 (Fix
regression in sizes of buttons with bitmaps in wxMSW, 2021-07-08) which
fixed the problem introduced by the first commit partly, but not
completely.

Closes #13130.
2021-08-26 22:24:13 +01:00
Vadim Zeitlin
5216d97f08 Use arch suffix consistently in all directories names
For some reason, we used "vc_x64_lib" as the output directory for the
libraries, but "vc_mswu_x64" as the output directory for the samples.

Place the arch suffix, i.e. "_x64" part, always after the compiler
prefix (possibly including version), for consistency with both the
library output directories and with MSBuild project files, as
build/msw/wx_setup.props uses $(wxCompilerPrefix)$(wxArchSuffix)_...
as wxIntRootDir value.
2021-08-26 23:12:40 +02:00
Vadim Zeitlin
91ae4e2f8a Merge branch 'update-xcode-builds' of https://github.com/discnl/wxWidgets
Update Xcode projects to correspond to the latest makefiles and use ARM
architecture instead of i386.

See https://github.com/wxWidgets/wxWidgets/pull/2484
2021-08-26 15:53:16 +02:00
Vadim Zeitlin
e307945170 Merge branch 'ui-locale'
Add wxUILocale class providing functionality which can be implemented
portably for all major platforms, including macOS, and doesn't force
the change of the global C locale, unlike wxLocale.

See https://github.com/wxWidgets/wxWidgets/pull/2464
2021-08-26 15:49:57 +02:00
Vadim Zeitlin
6d6f6763ad Simplify wxWidgetCocoaImpl::SetForegroundColour() in wxOSX
Use the colour directly in implementation class method and ensure that
we pass it the correct colour from wxWindow::SetForegroundColour()
itself.

This simplifies the logic a bit and avoids clang warning about unused
"col" parameter in wxWidgetCocoaImpl::SetForegroundColour().

Closes https://github.com/wxWidgets/wxWidgets/pull/2491
2021-08-26 14:34:39 +02:00
Vadim Zeitlin
bf9a56d65c Merge branch 'ci-msw-vs2022'
Add minimal support for MSVS 2022 and CI builds using it.

See https://github.com/wxWidgets/wxWidgets/pull/2490
2021-08-26 00:04:37 +02:00
Vadim Zeitlin
5a6109fdce Mention support for MSVS 2022 in the documentation
Note that this support is still incomplete, notably we don't have
*_vc17.sln files yet and the official build scripts haven't been updated
to build MSVS 2022 binaries neither.
2021-08-26 00:04:28 +02:00
Vadim Zeitlin
2c4b627cff Remove warning messages from clipping box unit tests
There is nothing that can be done about the warnings saying that using
transform matrix is not supported for the given DC kind and it's not
going to change any time soon (i.e. implementing support for transform
matrix for wxSVGFileDC is not planned), but in the meanwhile it results
in a lot of useless output in the CI logs when running the tests, making
it difficult to find real problems in the test.

This commit is best viewed ignoring whitespace-only changes.
2021-08-25 23:57:12 +02:00
Vadim Zeitlin
b057fd4a40 Fix wx-config --libs output for static monolithic build
Include all extra libraries we need (except for OpenGL ones, as there is
still a separate library for it, even in monolithic build) in wx-config
--libs output for static monolithic build as the application (may) need
all of them, as all the libraries are part of the single monolithic one
in this case.

It seems that we had an attempt to fix this as far back as in 5719eab2bf
(Fix missing 3rd party builtin libs for static monolithic builds.,
2006-09-17), but it was insufficient as it didn't take the dependencies
of the other GUI libraries (e.g. "media") into account.

Closes #19175.
2021-08-25 23:31:45 +02:00
Daniel Kulp
696f582d3e Improve appearance of wxTreeCtrl with wxTR_ROW_LINES in dark mode
Make the lines colour less bright to avoid having too high contrast
between the lines and the background, notably in dark mode under macOS.

See #19116.
2021-08-25 23:21:52 +02:00
Kvaz1r
2a92a0a516 Draw all borders for unfocused text control in wxUniv
The borders didn't appear correctly when the control didn't have focus.

Closes https://github.com/wxWidgets/wxWidgets/pull/2494

Closes #19248.
2021-08-25 16:08:18 +02:00
Vadim Zeitlin
696f1473df Merge branch 'mac-cmp-natural'
Implement wxCmpNatural() for Mac too.

See https://github.com/wxWidgets/wxWidgets/pull/2492
2021-08-25 16:03:23 +02:00
Blake-Madden
78952e8ed5 Improve ListCtrl::EnableAlternateRowColours() documentation
Mention that it needs to be called again after calling
SetBackgroundColour().

Closes https://github.com/wxWidgets/wxWidgets/pull/2493
2021-08-25 16:02:29 +02:00
Vadim Zeitlin
96ab1f0824 Implement wxCmpNatural() using the native function under macOS
Use [NSStting localizedStandardCompare:] which is supposed to use the
same order as Finder does.
2021-08-25 01:00:24 +02:00
Vadim Zeitlin
9c0b543c04 Rename wxCmpNaturalGeneric() test to its actual name
The name of the test was still using the original function name, update
it to the actually used name.

No real changes.
2021-08-25 00:47:26 +02:00
Vadim Zeitlin
dd0427514a Move wxCmpNatural() MSW definition to MSW-specific code
It is tidier to have MSW-specific stuff, such as shlwapi.h inclusion, in
wxMSW rather than common code.

No real changes.
2021-08-25 00:30:22 +02:00
Vadim Zeitlin
8b06dd03aa Use "vc143" version-dependent compiler prefix for MSVS 2022
MSVS 2022 preview defines _MSC_VER as 1930.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
d6d08087c0 Stop showing locale in the beginning of the unit test
This is useless, it is always just "C" as we haven't changed it yet.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
8156c921d3 Show precise compiler version when running the unit tests
Although the compiler is already shown as part of the build signature,
it doesn't always show the exact compiler version used, which can be
useful as well, so add it here.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
8e40441084 Disable wxEVT_TEXT_URL unit test in GitHub CI environment too
It was already disabled under AppVeyor and it also fails when using
GitHub Actions.

This almost certainly indicates that there is a bug in our code, but as
the failure still can't be reproduced locally, it's difficult to debug
and fix, so for now just also disable the test when using GitHub CI.
2021-08-24 22:50:19 +02:00
Vadim Zeitlin
23929ff27f Make preprocessor check in wxTextCtrl test more clear
The condition guarding wxEVT_TEXT_URL test was changed to use
wxHAS_2CHAR_NEWLINES in 15c5125572 (Refactoring, 2021-08-07) but
shouldn't have been as this has nothing to do with the use of "\r\n"
under MSW.

No real changes.
2021-08-24 22:50:00 +02:00
Vadim Zeitlin
8f9e679393 Recognize MSVS 2022 in solution files
Use its native toolset (v143) by default.
2021-08-24 22:11:29 +02:00
Vadim Zeitlin
6e2d6e9bd4 Enable using MSVS prerelease versions in MSVS CI workflow
Without this options (available in 1.0.3 only), MSVS 2022 is not
detected.
2021-08-24 22:07:36 +02:00
Vadim Zeitlin
b48a266c6d Try building with MSVS 2022 too 2021-08-24 22:00:15 +02:00
Vadim Zeitlin
5385c9ced1 Add DLL Release wxMSW CI build
Append the path to the directory containing the DLLs to PATH to allow
the tests to find them.

Also quote the value of the "Configuration" property as it may (and
does) contain spaces.
2021-08-24 19:33:45 +02:00
Vadim Zeitlin
4d465837e0 Disable currently failing DLL Release MSVS CI build
This was merged accidentally, leave only the passing static build until
the DLL build is fixed.
2021-08-24 17:26:22 +02:00
Vadim Zeitlin
6917f54c4b Merge branch 'ci-msw'
Add CI workflow using MSVS to build wxMSW natively.

See https://github.com/wxWidgets/wxWidgets/pull/2488
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
0701402737 Add CI workflow for building wxMSW using MSVS natively
This should allow running all the tests faster than it's done by
AppVeyor.

Ignore changes to this workflow file in all the other workflows.
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
c868088a49 Add MSVS 2019 solutions for the minimal sample and the tests
It seems inconsistent to have MSVS 2019 solution for the main library
itself, but only MSVS 2017 (and earlier) one(s) for the sample and the
tests, so add MSVS 2019 solution to them too.
2021-08-24 17:12:06 +02:00
Vadim Zeitlin
fcc5f5e290 Merge branch 'configure-direct2d'
Enable using Direct2D when building wxMSW using configure.

See https://github.com/wxWidgets/wxWidgets/pull/2487
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
7f8bd498ce Allow resetting IE emulation level to fail in the tests
Warn about it, but don't fail the test if it fails, as it does this in
the GitHub Actions "windows-2019" environment without any apparent ill
effects.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
69f0ccf029 Merge branch 'find-dialog-parent'
Use correct parent for the generic "Find" dialog, even when it is not
shown yet.

See https://github.com/wxWidgets/wxWidgets/pull/2486
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
37c5f079f1 Disable Direct2D checks failing under Wine
Now that these Direct2D tests are compiled, disable those of them that
fail under Wine due to missing support for Direct2D functionality we use
in Wine implementation.

Don't even give a warning message because there would be too many of
them in these tests, just skip them silently.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
6a99b2d9a8 Fix wrong exclusion in MSW cross-build CI workflow
Ignore GTK files, not MSW ones.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
ce92055f3a Fix the effective parent of wxGenericFindReplaceDialog
This dialog is non-modal and so using GetParentForModalDialog() for it
is not quite right, because this function checks that the candidate
parent window is visible, which may not be the case for a modeless
dialog parent, as the dialog isn't necessarily going to be shown
immediately, but may well be shown later, after showing its parent.

And not allowing to use the not yet shown parent was also inconsistent
with the native MSW version which didn't have any problem with this.

So fix this by adding new GetParentForModelessDialog() function and
using it for this modeless dialog instead. This required slightly
refactoring wxDialog code to allow reusing most of it between the old
GetParentForModalDialog() and the new function.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
b6e29ea4d1 Detect Direct2D when building wxMSW with configure
Check for Direct2D headers (only, as DLLs are loaded during run-time
anyhow) and enable Direct2D-based wxGraphicsContext implementation if
they are available when building wxMSW with configure.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
8bbcf0af09 Check that wxFindReplaceDialog parent is non-null before using it
Although this dialog is normally supposed to have a valid parent, don't
crash if it doesn't have one when any of its buttons are pressed.
2021-08-24 17:12:05 +02:00
Vadim Zeitlin
0798906e7b Simplify wxFindReplaceDialogBase::Send() code slightly
Use ProcessWindowEvent() instead of GetEventHandler()->ProcessEvent().

No real changes.
2021-08-24 17:12:04 +02:00
Jouk
cc3afe0dc6 Include wx/toplevel.h to for wxTopLevelWindow 2021-08-24 14:05:00 +02:00
Vadim Zeitlin
45dcb1a8a5 Replace IsProofCheckEnabled() with GetProofCheckOptions()
This is more consistent with EnableProofCheck() and allows to retrieve
the current state of grammar checking under macOS, which can be checked
by user and so can be useful to know.
2021-08-23 14:19:11 +02:00
Vadim Zeitlin
94173e3fae Remove stub spell checking functions from wxiOS wxTextCtrl
There doesn't seem to be any need to have these functions here as the
base class implementation already does exactly the same thing (i.e.
nothing at all).
2021-08-23 14:18:42 +02:00