It seems that ListView_ApproximateViewRect() always reserves space for
the horizontal scrollbar vertically, even when it isn't needed,
resulting in a lot of blank space remaining in horizontal wxListbook
(e.g. using "top" orientation) in the notebook sample.
So instead of adding extra space when the scrollbar is shown, remove it
when it is not shown.
It looks like ListView_ApproximateViewRect() doesn't actually take the
borders into account and doesn't even take margins into account
correctly.
With this change, vertical wxListbook in the notebook sample doesn't
show any horizontal scrollbar and has symmetric margins around its
contents (whether it shows a vertical scrollbar or not) under both
Windows 7 and 10.
The style needs to be explicitly included in the serialized
representation as it's not necessarily part of the native font
description itself, but can be emulated using a transform matrix.
Also fix the font family handling by recreating the native font info
from the newly generated font.
Closes#22373.
Fix a regression in 3.1.6 which resulted in not showing any images if
the associated image list was empty when it was associated with the
control, as HasImages() returned false in this case and so wxLC_ICON
style was not set.
The fix is to return true from HasImages() if we have image list even if
it is currently empty, as we can't know when (or if) it will become
non-empty and it's better to assume that it will be used (as nothing
really catastrophic should happen if it is not used, finally) rather
than not taking into account the images added to it later.
Closes#22364.
macOS 12 doesn't provide "Courier" and "Times" fonts any longer, so use
their closest replacements "Courier New" and "Times New Roman" instead.
In addition to using them for our own default fonts, also map
user-provided fonts with the old names to the new ones, as in practice
quite a few applications specify these face names rather than relying on
wxFontFamily and it seems better to allow them to keep working correctly
under macOS 12+ rather than using a completely different default system
font when e.g. "Courier" is specified.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Closes#22355.
This is slightly more economical, both at run-time and, maybe more
importantly, at compile-time than using wxSharedPtr that we don't really
need here, simple intrusive ref counting smart pointer is enough.
This is not really necessary and breaks encapsulation of this private
method. It is enough to provide just a way to copy the data from another
object as this is all that the derived classes really need.
Add wxSharedClientDataContainer class storing ref-counted client data
and use it instead of plain wxClientDataContainer in wxGridCellAttr,
wxGridCellEditor and wxGridCellRenderer classes.
This allows to keep the same client data associated with many grid cells
without having to make many copies of it.
It is, so remove "macOS and Linux" from its line.
Add maximum tested versions for it and gcc too, for consistency with
MSVC and because it can be useful to know.
See #22363.
Don't use FromDIP for 0.
Include DIP in drawing sample variable and function names to make it clear these sizes are in DIP.
Show both logical and DIP coordinates in statusbar.
Use wxCHECK, not wxASSERT, for checking a critical precondition to
ensure that we don't crash if it's violated.
This fixes crashes in various wxDataViewListCtrl methods if they're
passed an invalid index different from wxNOT_FOUND.
Closes#22358.
Move the popup to the display where it will be shown, so the size
calculations are based on the correct DPI.
Also adjust the tip size to the current DPI.
Closes#22361.
Don't hardcode inset sizes any longer.
This improves various issues under macOS 12, see #22134 and #22135 (but
doesn't fully fix the former problem yet).
Closes#22351.
It looks like wxGetTranslation() was not actually called for these strings
earlier, so do call it.
The context fulfills also the same purpose as TRANSLATORS: comments --
removing comments as redundant.
Many key names are short and commonly used words; e.g. "Delete", "Left",
"Right", "Pause", "Menu", "End".
It is not at all unlikely that such words could be used in a completely
different meaning elsewhere in the code. That is why this list of
keys should be assigned a context.
The context fulfills also the same purpose as TRANSLATORS: comments --
removing comments as redundant.
Fix the bug introduced in ec0734f96f (Install DLLs in bindir, not
libdir, when using MSW toolchains, 2021-01-09): the directory where the
DLLs were installed wasn't created any more, resulting in errors if it
didn't exist.
Update to latest bakefile version adding the missing mkdir command to
fix this and also use a released bakefile version for the wx makefiles.
Regenerate configure to match the new version.
See #14601.
The name resolves to Cloudflare proxy which redirects all HTTP URLs to
HTTPS, which breaks the existing tests using HTTP, so prevent this from
happening by using the actual IP address instead.
When using Cloudflare, as we do for www.wxwidgets.org, the connection
succeeds as long as Cloudflare itself works, but reading later fails if
the real server behind Cloudflare proxy does not, so check if we can
read something from it.
Get rid of the ugly WX_ASSERT_MESSAGE() and also use REQUIRE/CATCH
directly instead of CppUnit compatibility macros.
Also use sections to execute the next loop iteration(s) even if the
current one fails.
This commit is best viewed ignoring whitespace-only changes.