Although white background was used if the brush was never set, setting
and resetting it nothing unexpectedly (and inconsistently with the other
ports) resulted in using black background.
Fix this by just resetting the brush to white if it's invalid, instead
of not setting it at all.
To preserve layout, old wxComboBox should be replaced with the new one in the same location in the sizer. So we need to create a new combo box first, put in the sizer and only after that the old combo box can be deleted.
Since 848f5e78a6 the background wasn't
cleared at all if the background brush hadn't been explicitly set prior
to calling wxDC::Clear(). This was incompatible with the old behaviour
and even managed to break our own print preview code, so it clearly
wasn't a good idea to change Clear() like this.
Instead, continue to clear the DC using white background by default,
while still not doing anything if a transparent background brush had
been explicitly set.
This fixes print preview background under MSW.
See #10273, #18371.
Checking whether alpha info flag contains one of
the constants representing image/bitmap with alpha
channel is done more than once in the code so this
check can be moved to a dedicated function.
This makes the collapsible pane allocated exactly its best size better
looking, as the header is centered now, instead of having a border on
the left side, but not on the right one.
See #18515.
DoGetBestSize() actually calculated the best client size and not the
full size, as it didn't take the pane border into account.
Fix this in the simplest possible way, by just renaming the function to
DoGetBestClientSize() instead.
This ensures that the pane is actually big enough to show its contents,
without cutting off the text shown in its header.
Closes#18515.
Make it more clear that we do what we do in DoGetBestClientSize()
because of what our OnPaint() does.
Incidentally fix off by 1 (or 2 under non-MSW platforms) mismatch
between the 2 methods: the gap between the button and the text is
actually just 2 DIPs, not 4, but we need to add another 1 DIP for the
focus rectangle under MSW.
Somehow using enum results in wrong comparison being done when using gcc
5.3 (the test run when using this compiler fails because the RHS value
is "true" and not the numeric value of the enum element), so add a cast
to make this work.
This key combination is used for selecting all text, while it's also
relatively common to use it as an accelerator for some menu item.
Resolve the conflict in favour of wxTextCtrl, i.e. let it have this key
when it has focus, while still allowing to use it as an accelerator
otherwise.
Create this frame as child of the main application window to make it
appear near it, instead of in a more or less random location. This
facilitates debugging, but doesn't really change anything otherwise.
This symbol can be predefined to use the libraries built with "vc14x" as
the compiler prefix. This can be useful to reuse the same binaries for
all ABI-compatible VC 14.x versions: 14.0 (MSVS 2015), 14.1 (2017) and
14.2 (2019).
Extend the description of library selection symbols used with MSVC to a
more general discussion of MSVC-specific symbols and document the
symbols affecting compiler prefix in this section too.
At least mention wxGraphicsContext and Bind() instead of only speaking
of wxDC and event tables.
Also mention sizers.
Do _not_ mention obsolete and deprecated wxList and friends.
Since wxBitmap can have both alpha channel values and mask we have to use
alpha channel (if required) in the sub-bitmap even if the mask is provided
too.
See #18513.
In the function wxMask::OSXCreate() to create a mask image, data copying
from the supplied memory buffer was not actually implemented and therefore
created mask was invalid.
Closes#18513.
Notably mention that showing modal dialogs won't work in this case.
Also link to this explanation from wxListCtrl documentation as
wxEVT_LIST_ITEM_SELECTED is one of the perhaps less expected cases in
which this problem arises.
See #9973.
Use setCurrentText(), which works for non-editable combo boxes as well
as for editable ones, instead of setEditText(), which only works for the
latter ones.
Closes https://github.com/wxWidgets/wxWidgets/pull/1542