The Scintilla engine will automatically truncate lines in the
autocomplete listbox based on the call to AutoCompSetMaxWidth().
It is not good to do it in the wx implementation code as well,
since then the meaning of AutoCompSetMaxWidth(0) (e.g. no truncation)
is not valid and the list items will be truncated anyway.
Closes https://github.com/wxWidgets/wxWidgets/pull/2250
This could be further improved by defining array matchers instead of
using the macros, but for now just get rid of the last traces of CppUnit
in this file.
No real changes.
Replace "equal" parameter with the (opposite) "lowerBound" one with a
more descriptive name, add a comment describing it and also remove the
default value to force explaining how it is used in the caller.
No real changes.
Just the error code is not very useful as it doesn't say anything about
what exactly failed, e.g. seeing "The buffers supplied to a function was
too small." doesn't help understanding which function was passed a too
small buffer, so add an extra parameter to SetFailed[WithLastError]() to
log this information too.
Also log the error code itself, because SEC_E_BUFFER_TOO_SMALL is
arguably more clear than its ungrammatical error message.
No real changes.
Closes https://github.com/wxWidgets/wxWidgets/pull/2247
This was broken in da973c3caf (Get rid of CppUnit boilerplate in numeric
validator unit tests, 2021-02-21) which replaced DestroyChildren() in
the old CppUnit test case dtor with just "delete m_text", as this didn't
take care of "text2" created in one of the tests.
Using DestroyChildren() still seems overly side, so ensure that "text2"
is destroyed explicitly.
In addition to not accepting "-1" as a valid unsigned value, we also
must not format unsigned values as signed ones, i.e. we need to use
wxNumberFormatter::ToString() overload taking unsigned for them.
Do it in wxIntegerValidatorBase::ToString(), used by TransferToWindow(),
and add more tests for the latter.
Also reorganize the tests in sections and use REQUIRE() for the checks
that should prevent the rest of the section from running if they fail.
This somehow succeeds when using gcc 4.8 under Ubuntu 14.04 or MinGW
5.3, so don't fail the tests in this case, but still warn about it
because it seems quite unexpected.
Just replace CHECK(!condition) with CHECK_FALSE(condition), this should
result in slightly more clear error messages.
Also make tests for long and long long more consistent.
Use the actual type of the value, not LongestValueType, for storing
m_min and m_max as this is necessary for the comparisons between the
value and them to work correctly for unsigned types.
Also check for precision loss when converting from the bigger
LongestValueType to the actual type.
Add new unit tests, that failed before, but pass now.
This is necessary in order to deal with the numbers greater than
wxINT64_MAX that can't be represented in just long long.
It also allows to implement the intuitive handling of minus sign for the
unsigned numbers, i.e. not to accept it in FromString(), unlike the
standard functions which do (and parse -1 as 0xffff...fff).
Also extend the tests to check for more boundary cases.
Changes of d245dc9e1f (Fix drawing of dotted lines with wxDC in wxMSW,
2020-03-27) improved the appearance of dotted and dashed lines in wxMSW
but at the expense of significant (up to a factor of 300) slowdown.
Allow the applications for which the drawing performance is important to
explicitly request the old behaviour, with uglier, but faster, pens by
choosing to use low quality pens.
Update the graphics benchmark to allow specifying the pen quality and
verify that the performance when using it is the same as before 3.1.4.
See https://github.com/wxWidgets/wxWidgets/pull/2218
See #7097.
Closes#18875.
Define a couple of helper functions to avoid over long lines or having
to break them and also align the tests vertically to allow scanning them
more easily.
No real changes.
Actual implementation of IsCharOk() didn't correspond to the comments in
it or near the function declaration which stated that it's never called
with ch='-' as argument -- it was called with it and called IsMinusOk()
right before a comment saying that it doesn't need to do it, which was
very confusing.
Fix this by making the behaviour really correspond to the comments and
handling '-' at the base class level. This required introducing a new
pure virtual CanBeNegative() function, but it's going to be useful for
other things later too.
Still keep IsMinusOk() helper, but make it private now because it
doesn't need to be called from the derived class IsCharOk() any longer.
There is just no need to do it manually, when the compiler can do the
job perfectly well itself.
No real changes, but this will simplify the upcoming refactoring.
Don't apply the workaround required for NSRoundedBezelStyle and
NSTexturedRoundedBezelStyle, i.e. enlarging too small buttons, if these
bezel styles are not used. In particular, avoid enlarging buttons with
wxBORDER_NONE or wxBORDER_SIMPLE.
Follow-up to 0941b25.
Simplify code and use CHECK() rather than REQUIRE(), which is what
CPPUNIT_ASSERT() is defined as, to continue running the tests even if
some of them fail.
Using IWICBitmapClipper it is possible to get a clipped version
of the source bitmap so it should be used instead of manual way
with extracting pixels to the memory.
Add wxRIBBON_ART_PANEL_HOVER_BORDER_COLOUR and
wxRIBBON_ART_PANEL_HOVER_BORDER_GRADIENT_COLOUR to allow further
customization of wxRibbon panels.
Closes https://github.com/wxWidgets/wxWidgets/pull/2239
Using docker results in errors due to rate limit on pulling, so try to
reduce its use as much as possible. It still has to be used under Ubuntu
14.04 because it has a version of Python too old to work with HTTPS
servers using SNI and so using pip fails there.
Change "make install" to install catalog files with version suffix and
modify the sources to look for suffixed catalog first, while still
falling back to just the base name if the variant with the version is
not found, because the message catalogs are copied manually in practice
under MSW/macOS systems and so won't have the version suffix there.
This allows to make message catalogs installed by different
wxWidgets versions to coexist on the same system, see
https://groups.google.com/g/wx-users/c/L9gC8UgrO6Y
Closes https://github.com/wxWidgets/wxWidgets/pull/2219
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>