Check for the presence of alpha channel before using it in the fallback
code.
Also add a unit test exercising this branch of the code and which
crashed before.
No real changes, just execute only the tests relevant for the section
being executed instead of always running the code loading PNG images
when running a section not using them at all.
This has the advantages of being a bit faster to execute (and the total
test suite run time does add up) and, more importantly, showing the
right amount of tests when executing a single section: e.g. now it's 1
in the simplest case, as expected, and not 5.
The disadvantage is, of course, slightly more code duplication, but it
doesn't seem a huge problem in practice and making each section code
more self-contained is arguably worth it.
Also, compensate for this somewhat by extracting all XPM definitions at
the function level: those are only initialized once (being static), so
there is no need to duplicate them.
Finally, also call AddHandler() once instead of once per section as
before.
Add new image test files added in 6e8da8641c (Add alpha blending for
wxImage::Paste, 2020-09-23) and 1f0ade29f0 (Fix using mask colour even
if there is no mask in wxImage::Paste, 2020-09-30) to Makefile, so that
they're copied to the build directory and could be found by the test
there, otherwise running wxImage::Paste test when building outside of
the source directory failed.
Actually do what the comment says is intended. wxLogInfo() and
wxLogVerbose() differ in that only the latter must be explicitly
enabled with --verbose.
This reverts commit 374db28747 (Fix wxMSW ListCtrl drawing of horizontal
rules for new items, 2016-05-04) and also commit bb3177dd3b (Avoid
infinite repaint loop in wxListCtrl with wxLC_HRULES, 2020-07-24) which
fixed one problem with the original change, but not all of them, as it
was still easily possible to get into an infinite repaint loop.
So just return to the simplest and not too bad, even if not optimal,
solution of refreshing everything after changing a column width when
using horizontal rules.
See #17158, #18850.
Closes#18927.
Make the names more clear and similar to the names of member variables
to which they correspond and also use them consistently in the
documentation.
This reverts the changes to this interface header done in 5925893eed
(Fix various doxygen issues in the documentation, 2019-10-20).
Commit 5925893eed ("Fix various doxygen issues in the documentation")
changed the name to client_data.
This does not fit the naming scheme, and breaks some code in Phoenix
which assumes the param is called clientData (to be able to use a
binding specific type for it).
Rename data to clientData in the inlined overloads. This change is
transparent for any users.
Rename shortHelpString to shortHelp (dito for longHelp). Although this
change is in general visible for any users, Phoenix already mangles the
the parameter names to strip the 'String' suffix.
The introduction of scrollbar animations broke scroll-to-end functionality when
large amounts of text are written, due to interactions with GtkTextView's
background layout. Work around this by scrolling after the layout has finished.
See #18864
The type obviously should be wxWindowID, not int.
Rename the parameter, as it is the only instance where the id is not
named 'id', the implementation already uses 'id', and for Phoenix naming
it id is also preferred, as the name is used for mangling.
The naming change causes no further breakage for Phoenix, as the generator
is currently broken anyway for this case.
Closes https://github.com/wxWidgets/wxWidgets/pull/2069
Fix a bug with wrong size passed to memset() introduced in 1f0ade29f0
(Fix using mask colour even if there is no mask in wxImage::Paste,
2020-09-30) which caused memory corruption and add a test (the one with
the large negative vertical offset) allowing to reproduce this reliably.
Closes https://github.com/wxWidgets/wxWidgets/pull/2067
Verify that constructing wxCaret using its default ctor and Create()
works too, now that it does -- previously it uses to result in a GTK
warning and a crash in wxGTK.
Also update the test to avoid assuming that wxBitmapComboBox inherits
from wxComboBox, which now allows it to build (and pass) on all
platforms.
Closes https://github.com/wxWidgets/wxWidgets/pull/2057
In case an image without alpha is pasted on top of an image with alpha,
the alpha blending gives wrong results. This is caused by the fact that
the final (if nothing has been pasted yet) pixel copying algorithm in
Paste() does not take into account whether the pasted image actually
uses a mask.
To fix this:
- Add the check for image.HasMask().
- In case there is no mask, simply copy the image via memcpy.
- Finally, update the alpha channel of the changed image (if present):
whenever a pixel is copied, the alpha is set to fully opaque.
Closes https://github.com/wxWidgets/wxWidgets/pull/2065
Add the source files present in the bkl but not CMakeLists.txt to the
latter one too.
Also link with AUI library now that a test file using it is included.
Closes https://github.com/wxWidgets/wxWidgets/pull/2064
Current DeviceToLogical{X|Y}(), LogicalToDevice{X|Y}(),
DeviceToLogicalRel{X|Y}(), LogicalToDeviceRel{X|Y}() functions
don't take into account transformations applied with
SetTransformMatrix() so conversion results are invalid if coordinate
system is e.g. rotated.
We need to implement new conversion functions that take into account all
applied transformations and also convert x,y coordinates in one call
because in general case x,y coordinates are coupled and cannot be
converted independently on each other.
Closes#18923.
Generic wxDC::DeviceToLogicalRel{X|Y}() and wxDC::LogicalToDeviceRel{X|Y}()
functions don't take into account scaling applied with
wxDC::SetTransformMatrix().
We need to implement in wxDCImpl and its platform-specific derivates
new conversion functions that take all applied transformations into account.
See #18923.
Fix variable name for the model.
Make the code using wxObjectDataPtr have the same flow as the
code using a raw pointer.
Format the code to be in accordance with the official guidelines.
Closes#18924.
Now that this class is not a template any longer, we can have the code
for radio button group navigation directly in it, without making it
inline, so move the existing functions bodies into the new methods and
remove the old functions entirely.
No real changes, this is just a refactoring.
Use a dirty hack to accommodate wxUniv by deriving wxRadioButtonBase
from wxCheckBox, rather than wxControl, there. This is not pretty, but
should be addressed by refactoring wxUniv code and in the meanwhile all
the other ports don't have to bother with using a template class
unnecessarily.
Now that we do have wxRadioButtonBase class, declare wxRadioButton API
methods as pure virtual in it, to force the derived classes to implement
them.
Also remove the outdated comment saying that there is no base class for
wxRadioButtons in different ports, this is not true any longer.