Use wxUIntPtr rather than (unsigned) long in wxImage::ResampleNearest()
as long is still 32 bits under Win64 and so doesn't allow the code there
to work with images larger than 2^16 in either direction, when it could
be allowed in this case.
Document the current limits on the size of the image and add a unit test
checking that resizing images of size greater than 2^16 works in 64 bits.
See #18550.
Do this for consistency with the other ports and because this seems more
useful anyhow.
Update the documentation to make this behaviour more clear and document
this change as a (minor) incompatibility in wxMSW.
Also add more unit tests to check for this behaviour. Note this also
fixes the problem with the unit test added in the grandparent commit
under MSW.
This is explicitly allowed and we even have a unit test checking for
this, but the test crashed under macOS.
Fix this by simply doing nothing in wxWindow::DoEnable() if the window
is not created yet.
Just return NULL from this (wxOSX private, in spite of not using a
port-specific prefix) method.
This fixes crash in wxButton::SetBitmapXXX(wxNullBitmap), as shown by
the new test case which used to crash but doesn't do it any longer.
Closes#19257.
Set window position explictly to (0, 0) to avoid unwanted clipping
if defualt position selected by the system would place it (partially)
outside of the parent window.
Save initial affine transformations for just created CGContext
(like it's done in all wxMacCoreGraphicsContext ctors) to properly
manage user-defined transformations in SetTransform(),
GetTransform().
This is done to fix the build error in STL builds after the previous
commit, as using Find() or DeleteObject() with a pointer of the "base
type" worked when using wxWindowList in the default build, but not in
the STL build, so this commit avoids this mismatch by allowing to use a
base class pointer where it is safe to do so, i.e. where it can be done
without a downcast, as there doesn't seem to be any reason to have this
difference between the builds in this case.
Note that there is still a difference between Append() and Insert()
methods which (correctly) require the pointer of right type in STL build
but still accept a pointer of the base type in the default build for
compatibility reasons.
In particular, this means that one of the casts removed in the last
commit from wxWindowBase code needs to be restored, as Append() still
requires a wxWindow and not just a wxWindowBase.
This list uses wxWindowBase for its elements, so downcasts are
unnecessary and actually harmful as the downcast performed in the dtor
results in undefined behaviour because the object is not a wxWindow any
more by then (thanks to UBSAN for detecting this).
Still run them on GitHub runners, but do it using the same steps as for
our own builds, as there should be no reason to have any difference
in the build steps independently of where exactly they run.
Also remove checks for matrix.skip_testing from the Unix CI workflow as
they are not needed there any more because the tests are always run.
This commit is best viewed with --color-moved git option.
Even "-qq" is insufficient to suppress the annoying, and useless for
non-interactive use, "Reading database ... NN%" output, so add the
option suppressing it to all apt commands.
Also use "-y" as a single "-q" is not enough to suppress the prompts.
Do it in the command executed by sudo, as sudo doesn't propagate the
environment variable values by default (--preserve-env option could be
used to do it, but it's simpler to avoid it).
For some reason 32 bit libgl1 is not pulled in as win32 dependency any
more, resulting in errors when running the test using Direct2D.
Fix this by installing the package explicitly.
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.
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.
Reverting the commits broke indentation, which resulted in
-Wmisleading-indentation from (recent) gcc, so fix it by indenting the
restored "if" properly.
See #13130.
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.
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.
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.
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.
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
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
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.
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.
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.
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.