Commit Graph

72213 Commits

Author SHA1 Message Date
Maarten Bent
8e991510c5 Regenerate the embedded svg data of wxlogo.svg 2022-03-17 22:51:55 +01:00
Maarten Bent
14eda07aeb Adjust wxlogo.svg size and viewbox
Make it square with small borders and the coloured squares in the center.
2022-03-17 22:49:12 +01:00
Maarten Bent
0ac7f2295f Optimize wxlogo.svg with SVGO 2022-03-17 22:39:37 +01:00
Jouk
dc5eee8073 Add xh_bookctrlbase.cpp for compilation on OpenVMS 2022-03-17 09:42:22 +01:00
Jouk
7dd4d1d8b8 Disable Tango Art, because of problems 2022-03-17 09:29:49 +01:00
Paul Cornett
8f47d9ad48 Fix size of un-resizeable TLW with Wayland
GTK3 does not add the decoration size when using gtk_widget_set_size_request().
See #22155
2022-03-16 21:35:18 -07:00
Paul Cornett
1b129ef9a8 Fix client-side decoration size with GTK3
Get the decor size regardless of whether window size
is changing, as in some cases it never does.
See #22155
2022-03-16 21:27:08 -07:00
Ilya Sinitsyn
e5bd3ecec6 Handle item adding to DVC to a non-container node 2022-03-17 08:11:07 +07:00
Ilya Sinitsyn
c7d0247258 Fix item adding to DVC
Fix wxDataViewMainWindow::ItemAdded() when it used after
wxDataViewCtrl::AssociateModel() (it doesn't create child nodes so we should
not add child items at all to a collapsed node).
2022-03-17 08:11:07 +07:00
Ilya Sinitsyn
0144608b4b Test DVC with the custom model
wxDataViewCtrl::AssociateModel() don't create child nodes, which leads to
missing nodes if then used wxDataViewModel::ItemAdded(). So add the test
for such situation.
2022-03-17 08:10:58 +07:00
Maarten Bent
657be8b6dc Handle DPI change in wxSplitterWindow 2022-03-16 18:59:19 +01:00
Paul Cornett
bae7680d52 Improve GTK3 client-side decorations check
This is more like GTK does it
2022-03-14 09:46:20 -07:00
Paul Cornett
7ce4e521c5 Fix a TLW sizing issue with Wayland
Don't include the size of client side decorations when changing the
size of a GtkWindow, as GTK will add in the decoration size itself.
See #22141
2022-03-14 09:40:06 -07:00
Maarten Bent
9285d61393 Improve handling DPI change in wxSplitterWindow
wxSplitterWindow can receive multiple size events while the DPI change is being processed.
Keep using the relative sash position while the DPI change is finished.
2022-03-10 20:02:25 +01:00
Maarten Bent
23a3b74d3d Add a function to check if a DPI event is being processed 2022-03-10 19:59:30 +01:00
Lauri Nurmi
1c5e66a12c Allow RFC822 timestamps without a week day
RFC 822 specifies the week day is optional.
2022-03-10 19:25:21 +02:00
Lauri Nurmi
8d9d2684ef Fix out-of-bounds reads in ParseRfc822Date() with too short input
The implementation implicitly relies, in many places, on the assumption
that the input never ends prematurely. If it does, the iterator
pointing beyond the end of buffer is dereferenced, which is UB.

The solution used here is to append 32 zero bytes to the date string,
which hopefully keeps the code more readable than checking for the end
of string before each deference operation.

Add various syntactically invalid inputs to unit tests.

Closes #22185.
2022-03-10 16:44:44 +01:00
Vadim Zeitlin
2362010a48 Fix caching of files using wx headers with ccache
Avoid using, or even mentioning in the comments, __DATE__ and __TIME__
macros as doing this prevents ccache from caching the compilation
results by default (i.e. unless CCACHE_SLOPPINESS=time_macros is used).

As ccache simply scans for the given literal strings, using "##" token
pasting operator is enough to disable this pessimization. Of course,
this does mean that using ccache with the code actually using __TDATE__
or __TTIME__ is not going to work correctly, but there should be no
reason to do it any longer and these macros are not even documented, so
also mention that they shouldn't be used.

Finally do add __DATE__ to the only place in our own code where these
macros are used to ensure that it is not cached incorrectly.

Closes #22156.
2022-03-10 16:37:47 +01:00
Paul Cornett
7463d514bf Fix text drawing in caret sample with wxGTK3 and wxOSX
Don't use wxClientDC for drawing the text, just refresh the updated
character.

See #17820.
2022-03-10 16:18:20 +01:00
Vadim Zeitlin
3533decf93 Update libpng submodule to avoid spurious gcc 11 warning
No real changes.
2022-03-09 20:09:46 +01:00
Maarten Bent
1ecebd5c7c Handle DPI change in wxSplitterWindow
Adjust the minimum pane size to the new DPI.
Keep the sash in the same relative position.
2022-03-08 22:16:50 +01:00
Gideon van Melle
e43895e531 Update Dutch translations 2022-03-06 19:53:15 +01:00
Vadim Zeitlin
10ad88cdbe Don't consume context menu events in wxToolbook
This was preventing the application code from receiving them.

Closes #22153.
2022-03-06 19:50:59 +01:00
Vadim Zeitlin
3fa634677c Merge branch 'headercol-bmp-bundle'
Use wxBitmapBundle in wxHeaderColumn.

See #22137.
2022-03-04 03:37:37 +01:00
Vadim Zeitlin
570b78ebb5 Give a warning when using default scale factor in wxGtkImage
This is not supposed to happen, but warn about it if it nevertheless
does.
2022-03-04 03:37:20 +01:00
Alexander Koshelev
8f43e103e9 Use wxBitmapBundle in wxHeaderColumn in samples 2022-03-04 03:37:20 +01:00
Alexander Koshelev
33d8510d41 Use wxBitmapBundle in wxHeaderColumn 2022-03-04 03:37:20 +01:00
Vadim Zeitlin
31adb7d55b Merge branch 'bookctrl-bmp-bundle'
Use wxBitmapBundle in XRC handlers of wxBookCtrl-related controls and
refactor these handlers to avoid code duplication.

See #22151.
2022-02-27 22:45:25 +00:00
Vadim Zeitlin
9a3d3156ab Merge branch 'better-bitmap-resize'
Use "nearest" algorithm for resizing bitmaps.

See #22152.
2022-02-27 22:44:50 +00:00
Vadim Zeitlin
6db5ad0410 Merge branch 'msw-button-best-size-margins'
Compute MSW button best size ourselves correctly.

See #22149.

Closes #22125.
2022-02-27 22:44:03 +00:00
Vadim Zeitlin
5fa9e9ada1 Inherit wxTreebookXmlHandler from wxBookCtrlXmlHandlerBase too
Use the same logic for creating the pages of this book control as for
all the other ones and keep only wxTreebook-specific "depth" and
"expanded" nodes handling in this class.
2022-02-27 22:42:01 +00:00
Vadim Zeitlin
2e27c12e56 Add virtual wxBookCtrlXmlHandlerBase::DoAddPage()
This will allow customizing the way pages are added to the book control
and will also be used in wxTreebookXmlHandler soon.
2022-02-27 22:42:01 +00:00
Vadim Zeitlin
d3c0d0c064 Move wxBookCtrlXmlHandlerBase::PageWithAttrs into the header
This struct is finally going to have to be declared in the header as it
will be needed by wxTreebookXmlHandler when it's modified to derive from
wxBookCtrlXmlHandlerBase too.

Also add GetImageId() function to the struct while moving it.
2022-02-27 22:42:00 +00:00
Vadim Zeitlin
1549aafdc9 Factor out common code from most wxBookCtrl-related XRC handlers
Add new wxBookCtrlXmlHandlerBase and inherit the XRC handlers of all the
wxBookCtrlBase-derived classes except for wxTreebookXmlHandler, which
will require special handling, from it to avoid duplicating the same
code in all of them.

This commit is best viewed with --color-moved git option.
2022-02-27 22:42:00 +00:00
Vadim Zeitlin
1d3149292c Don't declare wxPropertySheetDialogXmlHandler if !wxUSE_BOOKCTRL
This class is only implemented when wxUSE_BOOKCTRL==1 as its code uses
it, so it shouldn't be declared when wxUSE_BOOKCTRL==0 neither.

This fixes wxiOS build problem after the latest changes.
2022-02-27 22:40:52 +00:00
Alexander Koshelev
b70856089b XRC: use wxBitmapBundle in wxTreebook 2022-02-27 22:40:52 +00:00
Alexander Koshelev
93b4478992 XRC: use wxBitmapBundle in wxBookCtrl-related controls. 2022-02-27 22:40:52 +00:00
Alexander Koshelev
ca1eefdba2 Fix usage of wxWithImages::Images in wxTreebook 2022-02-27 22:40:52 +00:00
Vadim Zeitlin
8e367994d7 Fix wxWebViewEdge build with standard-conforming compilers
Convert wxCoTaskMemPtr<wchar_t> to wxString explicitly as doing it
implicitly required 2 user-defined conversions which is not allowed in
standard C++ (but works with MSVC).

Also get rid of a not really necessary temporary wxString variable and
just perform this case when constructing wxStringTokenizer.

Closes #22170.
2022-02-27 02:55:01 +01:00
Jouk
e7096e85d2 Fix combo sample build without wxHAS_SVG
Just don't use bitmaps at all if SVG support is unavailable.

Closes #22161.
2022-02-25 18:32:24 +01:00
Jouk
6c9d1291f6 Fix build under OpenVMS where mkdtemp() is unavailable
Just skip the part of the test using this function under OpenVMS.

Closes #22158.
2022-02-25 18:23:32 +01:00
Kvaz1r
1d585eef05 Fix scrollbar position in wxGrid and wxDataViewCtrl in wxUniv
Skip the event in wxEVT_SIZE handler in wxGrid and wxDataViewCtrl as it
was already done for wxListCtrl in 98c2eef619 (Fix scrollbar position in
wxListCtrl in wxUniv, 2021-09-05).

Closes #22145.
2022-02-25 18:23:12 +01:00
Jouk
6d0f5ec591 correction on the merged pull #22157 2022-02-25 08:12:44 +01:00
Lauri Nurmi
1ad25bdd5c Demonstrate how to interrupt closing an application
Add a menu item to the dialogs sample for simulating having unsaved
documents in the application. Then demonstrate how to do something
when the user attempts to close the application, e.g. show a dialog,
and possibly cancel closing.

This code was originally written for debugging some issue related to
closing an application, but besides that it serves as an example of a
very common pattern a lot of real world applications need in some form.

Mention the example in samples/dialogs in wxCloseEvent documentation
2022-02-25 00:37:58 +01:00
Lauri Nurmi
d8ddf1307a Fix compilation on recent FreeBSDs by ignoring <sys/epoll.h>
On recent FreeBSDs, the "Linux-only" <sys/epoll.h> exists in the default
include path, and is thus detected by configure. However, the header belongs
to the epoll-shim emulation library, and it is doubtful whether using it
on FreeBSD is a good idea. Therefore check that the operating system
is actually Linux before enabling wxEpollDispatcher.

Closes #22146.
2022-02-25 00:36:53 +01:00
Jouk
9129254574 wxGTK1 build fixes after the recent changes
Update wxMenuItem to use wxBitmapBundle and wxSpinCtrl use
DoSetIncrement() in wxGTK1 just as it was done in wxGTK.

Closes #22157.
2022-02-25 00:24:47 +01:00
Vadim Zeitlin
e77d5f3094 Log the exit code of run_apt shell function
It seems like this function sometimes doesn't return non-zero exit code
even though it fails to fetch some packages (e.g. due to a network
error), so log its status code to check if this is really the case.
2022-02-25 00:16:10 +01:00
Vadim Zeitlin
ef22f4c3db Add wxSuffixDebug to MSVS properties file
This property expands to either (just) "d" (even in Unicode builds) or
nothing depending on whether we're building in debug or release and can
be used to construct the configuration-independent names for the third
party libraries, most of which use just this suffix and not wxSuffix,
which expands to "ud" in (Unicode) debug build.

This allows to use exactly the same link dependencies for both debug and
release configurations, as demonstrated by the updated minimal MSVS
project file, which is convenient when creating new projects not using
wxwidgets.props, as it allows to enter the dependencies just once and
use them for all build configurations instead of having to enter them
separately for the debug and the release ones.
2022-02-23 22:12:57 +00:00
Vadim Zeitlin
84cb293e71 Make wxBitmap::Rescale() less horrible for commonly used icons
Make the results look somewhat better by using wxIMAGE_QUALITY_NEAREST
which preserves sharp horizontal and vertical edges in the images which
are common in the icons, with which this function is often used, instead
of blurring them as wxIMAGE_QUALITY_HIGH does.

This is also much (factor of ~40) faster, which shouldn't hurt neither.
2022-02-23 00:04:02 +00:00
Vadim Zeitlin
4e05ee9c5a Benchmark wxIMAGE_QUALITY_BOX_AVERAGE too for completeness
Check the speed of wxImage::Scale() using this algorithm too.

As expected, it's between normal and high quality when upscaling and
exactly the same as high quality when shrinking (because it is actually
the algorithm used for shrinking for wxIMAGE_QUALITY_HIGH).
2022-02-23 00:01:52 +00:00