Fix wxBitmapBundle::FromSVG(), which renders incorrectly on GTK and add
wxHAS_PREMULTIPLIED_ALPHA to make the code dealing with alpha more clear
and correct.
See #24097.
Replace most 'neither' words introduced after 66916c74a3 (Fix double
negatives used with 'neither' in docs and comments, 2022-08-15) with
'either'.
All changes are to comments only.
Closes#24090.
The previous ToCDouble() function accepted leading spaces, a starting +
sign, and hex strings. std::from_chars() does not accept spaces or +,
and requires a special flag to convert hex strings, so handle this
manually to preserve the old behaviour of this function.
This is similar to the changes done for ToCULong() in #24022.
Closes#24089.
This fixes a crash when DoShowMultipleLogMessages() is called with
wxUSE_LOG_DIALOG set to 0. The code after the #else statement gets the
size of the wxArrayString but then instead of accessing that array, it
tried to access the m_aMessages array which is empty, resulting in a
crash in the C runtime. This commit simply gets the strings from the
correct array.
Closes#24087.
We need to use a native clip view for things to behave correctly under
this OS version, otherwise scrollbars can be overdrawn by the window
contents.
Closes#24067.
Closes#24073.
Use TIFFFlush() in wxTIFFHandler::SaveFile() in order to check for
success when saving TIFF images, as TIFFClose() doesn't have any error
code to do it.
Closes#23214.
Closes#24072.
Some WMs initially report incorrect frame extents for the hint window,
then correct it to 0x0 later. This interacts badly with the deferred
show mechanism, causing the hint window height to be much too small.
Issues with TLW decoration sizes can be avoided by setting the client
size rather than the overall size.
All previous relevant platform-specific tests have been changed to use this
symbol. Also, samples/image now premultiplies conditionally, correcting a
visual anomaly on wxGTK.
In order to avoid drawing anomalies with wxGCDC on HiDPI displays, the shift
must be half a logical unit rather than half a device unit, and it needs to be
applied regardless of the scale factor. An exception is made for the zero-width
(one logical pixel) pen, which uses a half logical pixel shift. This reverts
d43b2862c3 (Fix drawing rectangle with width 1 pen using wxGCDC and HiDPI, 2023-04-25)
See #23485
Use wxOSX_USE_NSCELL_RENDERER to allow setting it to 0 to revert to the
old code.
Note that the new version is Objective C++, so the old .cpp file had to
be renamed to have .mm extension.
Closes#24053.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Refactor wxImageList and convert it to use physical pixels and
add support for high DPI state images wxTreeCtrl using the new
wxImageList.
See #24000, #24033.
It was unexpected and annoying that using keyboard in wxGenericTreeCtrl
could find the item completely different from the expected one because
it could open a currently collapsed branch and find an item deep under
it instead of the item visible on the screen, so change the code to only
find the visible items when typing their label in the control.
This is similar but not totally identical to the existing
GetNextVisible() as it doesn't require the initial item itself to be
visible (notably, it could be the hidden virtual root).
It is also more efficient than the old GetNextVisible() implementation
calling GetNext() in the loop until finding a visible item, as it avoids
looking inside collapsed items in the first place.
Just check if the scale factor has changed when getting a "configure"
event for a TLW as we're guaranteed to get one when the scale factor
does change, according to GTK documentation (and it does seem to work).
Closes#19290.
When the original messages language matches the language of the locale
being used, these strings can be used directly and so AddCatalog()
should still return true for them but it didn't do it any more after the
changes of 94b1a17aeb (Add AddAvailableCatalog() and use it in
AddStdCatalog(), 2023-09-30).
See #18227.
Closes#24019.
Closes#24037.
The new function does the same thing as the Mac-specific
OSXMakeDPIFromScaleFactor() that it replaces but is also defined in
wxGTK where it will be used too.
This allows to dump a bitmap to a disk file in order to examine it
outside of the debugger when debugging.
Note that at least MSVC and gdb are not smart enough to allow calling
wxBitmap::SaveFile() directly.
Take const pointer in GetConsensusSizeFor(), which only uses this
parameter to get the DPI scale factor, and CreateImageList(), using it
only to pass it on to GetConsensusSizeFor().
No real changes.