Setting wxFLEX_GROWMODE_ALL for the non-flexible direction broke
handling of proportions in the flexible direction which were
unexpectedly not taken into account at all any more due to not passing
them to DoAdjustForGrowables().
Fix this by still respecting the proportions in this case and add a test
case to ensure this doesn't get broken again.
Closes#23251.
See #23253.
Don't always "succeed" in wxUILocale::UseDefault() and, consequently, in
wxLocale::Init(wxLANGUAGE_DEFAULT), under Unix systems, even if the
locale couldn't actually be set, as it can happen if the environment
variables contain a locale which is not supported on the current system,
e.g. a "mixed" locale such as "en_FR", or even a completely invalid
string such as "bloordyblop", which still used to succeed.
For now only fix it for reasonably modern systems with locale_t support,
it could be done even for the ancient ones without it later too if
anybody still cares about them.
Closes#23218.
This function replaces the existing GetSystemLocale() as it can
represent the locales that don't have any corresponding wxLanguage
values and for which GetSystemLocale() has no choice but to return
wxLANGUAGE_UNKNOWN.
When looking for the language information, we must recognize the
language independently of the region it is followed by, so en_FR is
still English and fr_DE is still French, even if the full locale is
unknown, but this wasn't the case before.
Fix this by comparing the language part of wxLanguageInfo with just the
language of wxLocaleIdent we're trying to match, instead of comparing it
with its full BCP47 tag, which is never going to match.
At least under macOS it fails when the system locale is something like
en_DE, for example, as setlocale() doesn't support such locales.
Use wxUILocale::GetSystemLanguage() instead of wxLANGUAGE_DEFAULT.
This can be useful to compare the results of calling
wxUILocale::GetSystemLanguage() and the function with the same name in
wxLocale (which actually corresponds to wxUILocale::GetSystemLocale()).
wxGraphicsContext::ResetClip (wxOSX)
Using native CGContextResetClip() to reset the clip causes some
drawing glitches - especially with drawing text with CT - see
https://github.com/wxWidgets/wxWidgets/issues/22629#issuecomment-1399554002
For the time being we have to revert to the previous code
with emulated resetting based on restoring the graphics context state.
We also have to disable a unit tests that fails with emulated
resetting the clip.
See #22629.
This is a generalization of the existing "platform" attribute and allows
to only include some XRC elements if and only if an arbitrary "feature"
is enabled by the application before loading the XRC document.
Work around a bug in wxOSX which breaks the test if we call DumpFont()
because this function calls wxFont::GetPixelSize() which actually
changes the size of the font if it was specified in pixels.
This should be reverted once the bug is fixed.
See #23144.
In wxMSW wxFont::GetPixelSize() returns the size that the font was
originally created from while in the other ports it returns the actual
size being used.
wxMSW behaviour is probably wrong and should be changed, but for now
just restrict the comparison to the vertical component to avoid the test
failures.
Such functions modifying errno is undocumented, and may come
as a surprise to the caller. Consequently also a call to
wxString::Format() would modify errno.
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.
Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.
Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
With delay after refreshing testing window added in 808bbe8341 ("Fix
executing wxPaintDC-related tests under wxGTK", 2023-01-04) wxPaintDC
tests work also under wxOSX.
This requires an image accessible via HTTP (and not HTTPS) but we don't
have any such working URLs any longer since the recent change on
www.wxwidgets.org.
Still make it possible to test this manually by predefining an
environment variable containing the URL.
Don't hardcode black as the default font colour, as this can be
unreadable in dark mode.
Also update the unit test to not always expect the initial colour to be
black.
Give more details in case of failure by using INFO() and use simple
CHECK()s instead of ugly WX_ASSERT_EQUAL_MESSAGE as they will show the
failing test anyhow.
No real changes.
Use a helper function to both make it shorter and provide more
information in case of a check failure: now the output will include the
name of the file, comparing with which failed, allowing to immediately
see which test failed.
Native control doesn't seem to implement TCM_HITTEST correctly for the
tabs on the left or right side, so provide our own implementation of
HitTest() in this case.
Also add a unit test checking that HitTest() does something reasonable.
Closes#4775.
Closes#23023.