Ensure that the font has exactly the point size entered in the dialog,
rather than having a fractional point size close, but not identical, to
it, as happened before due to first rounding the result of converting
the point size to pixels and then _not_ rounding the result of the
reverse conversion.
This resulted in wxFont::GetPointSize() returning the correct value, but
not GetFractionalPointSize(). Now the latter returns the same, correctly
rounded, value too.
The native dialog doesn't take the actual DPI into account, so convert
our font sizes that do use the DPI to the standard one before using it
and convert font height back to the value corresponding to the actual
DPI once a font is selected in it.
Closes#22313.
The changes of 2144ca38d2 (Get rid of CppUnit boilerplate in
DynamicLibraryTestCase, 2022-04-17) accidentally undid the workaround
from 054cb35b39 (Workaround for a crash with gcc 9.1 from MSYS2 MinGW
32bit, 2019-08-03), so work around the same problem again by avoiding
using CHECK() with function pointers.
The default httpbin listening port 5000 is used by Monterrey (macOS 12)
Control Center for its own needs, so use another port to avoid conflicts
with it and the resulting failures when running wxWebRequest unit tests
under this macOS version.
Use CATCH macros directly, this is simpler and more clear.
Also use narrow strings instead of wide ones and get rid of wxT() too.
No real changes.
This commit is best viewed ignoring whitespace-only changes.
Under Monterrey (macOS 10.12) we can actually load the file using
wxDynamicLibrary even though it does _not_ exist on the disk, so don't
skip the test just because of this.
Restore the old behaviour of wxLocale, which is supposed to use the
default locale and not the preferred language, which may not be the same
(see #22281).
Also apply the following fixes and improvements to wxUILocale:
- Add new GetSystemLocale() method.
- Change the MSW implementation to use the default locale instead of the
preferred UI language for Windows versions below Windows 10.
- Change the Unix implementation to respect LANGUAGE environment
variable and use it for determining the preferred UI languages.
- Use wxUILocale in wxTranslations to determine the preferred UI
languages.
- Use wxUILocale during initialization of internat sample.
Closes#22281.
Closes#22318.
MSWDefWindowProc(WM_PAINT, ...) in OnPaint causes performance issues on
large screens so only use it when an actual custom background colour is
set.
Closes#22308.
Closes#22320.
Only run install_name_tool on our own libraries as part of "make
install" instead of doing it on all libraries in the installation
directory: this was at best useless and at worst harmful, as some
combinations of install_name_tool and macOS versions don't work well
together and result in corrupting the already installed libraries.
Don't just wxASSERT(err == 0), as this expands to nothing in the release
builds. Use wxCHECK() instead so that we at least return an error even
in the release builds too.
Avoid manual memory management.
This was already fixed once in 563f41c686 (Fix memory leak on error
return in wxOSX wxDisplay code., 2014-02-21) but incompletely and then
another instance of new/delete[] was reintroduced in d5180d3604 (add a
GetFromWindow implementation to wxDisplayFactory, 2020-08-07). Get rid
of all of them now and use wxScopedArray<> instead (we could also use
wxVector<> or even std::vector<> too).
No real changes.
Make this function virtual in the base class so that it could be
overridden to do the right thing in wxAuiNotebook, instead of just
always returning NULL as before and add a unit test checking that it
works.
Explain that wxBookCtrlBase::m_pages may not be used in the derived
classes, but that in this case they must override all the methods using
it.
Finally, "soft-deprecate" wxAuiNotebook::GetPageIndex(), which is
identical to FindPage() now.
This fixes infinite recursion when handling wxEVT_HELP in wxAuiNotebook
in wxUniv too, see #22309.
Closes#15932.
Restrict the extra workaround for wxUniversal wxNotebook added back in
ec09e18d35 (more fixes to OnHelp() to avoid infinite recursion when
handling help events, 2006-06-14) to wxUniversal, to keep the code
simpler and more robust in the main ports.
Notably, this is sufficient to fix infinite recursion when pressing F1
in a wxTextCtrl used as a wxAuiNotebook page in non-wxUniv builds.
See #22309.
This is much more realistic and looks less weirdly.
Also add the text directly as a page, without wrapping it in a panel,
just to show that this is possible and works too.
No real changes.
Update ccache-action to a not yet released version including the fix for
failing the entire CI job if saving the cache failed -- this shouldn't
happen at all, but in practice it does happen from time to time, and
it's better to succeed, rather than fail in this case.
Change the minimum version to 3.0. Version 2.8.12 has never worked,
because it does not support the VERSION parameter in project().
Replace GREATER_EQUAL comparisons, these are only supported since 3.7.
Move PCH related code to a separate file, and include it after
options.cmake and init.cmake. Because only then the wxBUILD_PRECOMP
variable is fully initialized.
Closes#22312.
This reverts parts of 533958be10 (recreating Xcode project files with
new script, 2022-04-16) that seem to have been committed accidentally
and are now preventing CI builds from passing.
It can be used to scale coordinates and sizes to make them DPI aware.
In the common headers, use wxDisplay::GetStdPPIValue() as default DPI value,
so the correct values are used on Windows (96) and macOS (72).
In wxMemoryDC use m_contentScaleFactor as the DPIScaleFactor, see e4c2298e5e
(Use window scale factor for all MSW wxDCs associated with windows, 2022-04-04).
This is at best useless and at worst harmful, as shown by the bug fixed
in the previous commit, so just don't do it if GetLongPathName() has
already determined that the path doesn't exist.
After the fixes to UNC paths handling, Normalize(wxPATH_NORM_LONG)
started adding an extra colon after the UNC paths.
Fix this by using wxGetVolumeString() instead of constructing this thing
manually and add a unit test checking for this.
Closes#22275.
This function returns wxBitmap by object, not by (const) reference since
wxBitmapBundle-related changes.
Also change signature of the other methods taking wxBitmapBundle instead
of wxBitmap now.
And some other minor improvements.
Closes#22306.
Fix declaration of 'o' hides previous local declaration warnings.
Change two wxCONSTRUCTOR_5 definitions using wxBitmapBundle instead of
wxBitmap (this does not give build errors).
wxGenericCalendarCtrl is missing all XTI implementations, so just use
RTTI. And fix building the xti sample.
Note the shared build still fails due to WXDLLIMPEXP related issues.
Closes#22300.
Closes#22301.