This was broken by 6feeed9fe9 (Handle transparency to the best of our
ability in wxImageList, 2022-05-05) as using alpha, rather than mask,
for these images resulted in alpha channel being just ignored.
Work around this by making at least one pixel not quite transparent in
this case.
This also makes things work for images using alpha channel with only 0
values, rather than mask covering the entire bitmap.
See #22400.
Closes#22437.
Even though it's better to not specify the preview frame size at all,
the size should still be used if it was explicitly specified, but this
didn't happen any more after the addition of the call to Fit().
Fix this now by only doing the equivalent of Fit() if no size was
explicitly given.
Also add advice about not setting the size explicitly to the
documentation.
Position of the editor should be adjusted after setting new virtual size
because this operation can scroll wxPropertyGrid contents and scroll
position needs to be taken into account.
See #22428.
Close the path corresponding to the polygon to ensure that the starting
and finishing edges are joined correctly, which wasn't the case before
as could be easily seen when using thicker pens.
Closes#22440.
Create a template with the additional webview includes and defines needed for Edge backend.
Use the template in the lib, dll, and monolithic build.
Fixes#19104
Having borders around the controls toolbar and preview canvas not only
wasted space, but also let the frame background show through, which
looked just ugly under MSW, where it is dark grey and so clashes with
the control bar background.
Simply remove them to save space and improve appearance too.
Give a reasonable default size to wxPreviewCanvas and fit wxPreviewFrame
to its contents.
Remove the useless call to Fit() from SizerWithButtons: the size set
inside it was just ignored anyhow.
This also allows to stop hardcoding the size in the sample, so don't do
this any more.
See #22439.
No real changes, just remove the useless call which was left over the
very first version of this code added in 7bcb11d307 (Many changes to the
printing classes., 1999-03-25).
Don't hardcode 70px size for the combobox, but let it determine its own
size instead, as 70 may well not be enough, depending on the theme and
the font size.
Closes#22439.
This was recently broken by bffcb88266 (Optionally detect not filtered
GTK log messages, 2022-05-12), see #22424.
Fix it by providing a trivial "do nothing" version of LogFilterByMessage
even if we can't implement it -- this seems to be preferable to using
preprocessor checks in the code using it.
Closes#22434.
Don't use wxWithImages::GetImage(), which is limited to only a single
bitmap resolution, but use GetBitmapBundle() instead to ensure that we
show the representation of the bitmap appropriate for the current
resolution.
This would seem to be required for drawing it correctly in the disabled
state, for example, but is still insufficient to fix its appearance, at
least with GTK 3.
See #22431.
The changes of adb8bbab4d (Sort font names in the dialog showing them in
the font sample, 2022-05-12) didn't compile with wxUSE_STL==1 because
wxSortedArrayString doesn't inherit from wxArrayString in this case.
Fix this by using wxArrayString and its Sort() method instead.
The fix of a5a5b1bb15 (Fix restoring focus after showing native modal
dialogs in wxMSW, 2022-04-07) wasn't quite correct as it used the parent
window specified when showing the dialog, but it should have been using
the effective dialog parent, i.e. owner window in MSW terms.
Fix this by passing GetParentForModalDialog() to wxWindowDisabler, which
ensures that the preserve the same behaviour as before, including
refreshing the owner window after the dialog as dismissed -- which turns
out to be important because some existing code relies on this happening,
see #22362.
This commit should hopefully fix the last regression after d311c705d7
(Make native dialogs application-modal in wxMSW, 2022-04-01) and still
solve the original problem (see #11887), while preserving the original
behaviour when there is just one top-level window.
This makes the list of the fonts much more readable, compared to listing
them in essentially random order.
Incidentally stop using manual memory allocation to avoid giving a bad
example.
In the future it might be useful to run the code with WXTRACE=gtklog to
see if any GTK log messages we're filtering don't need to be filtered
any longer.
These messages are due to an assertion failure deep inside ATK which
doesn't indicate any real problem (as failure to get the label of an
already destroyed tab is normal and is already handled correctly in the
GTK code) and can't be avoided, so suppress them to avoid showing them
to the users who can't do anything at all about them anyhow, but can be
scared by the "CRITICAL" GTK messages.
Closes#22176.
Refactor the code to separate setting of the log callback from the
filtering decision.
Right now the only existing filter is the one just checking the log
level, which is used by GTKSuppressDiagnostics(), but this will allow
adding other filters in the upcoming commits.
Compare the row position with the number of rows, not columns, fixing a
regression introduced in 3719ab3725 (Add support for rearranging wxGrid
rows order interactively, 2022-04-02) (see #22260).
Closes#22420.
Closes#22423.
Unlike direct tests of __cplusplus, using this macro also works with
(recent enough, i.e. MSVS 2015.3 or later) MSVC versions, even if
/Zc:__cplusplus is not used.
This simplifies some checks and makes some other ones (notably the check
for C++20 used before wxALLOW_COMBINING_ENUMS macro definition) work
with MSVC versions with C++20 support as intended.
There is no need to check for the weird case of using a C++11 compiler
with C++98 standard library any longer, this is not supposed to happen
and we don't support macOS < 10.7 since a very long time anyhow.