Post-3.1.1 Progress
Posted on
First of all, welcome to the new home of wxBlog. Thanks to great work by Bryan Petty, it is now hosted on https://www.wxwidgets.org/blog/ and, especially importantly, is now much simpler to update, which will hopefully result in more frequent posts.
Today I’d just like to write a few words about the changes in wxWidgets since our last 3.1.1 release back in February. Since then, there were more than 300 (non-merge) commits from 30 different contributors and while there hasn’t been anything particularly earth-shattering, a few things still merit to be highlighted:
-
wxWidgets can now be built with the latest g++ 8 under all platforms without warnings. This is not as trivial as it sounds, as g++ 8 introduced a few new warnings and enabled by default a couple of other, previously existing ones, which triggered a lot of warnings in wxWidgets headers. Fixing them involved significants modernizing some very old wxWidgets code in
wx/dynarray.h
, which was good on its own and resulted in some collateral bug fixes and enhancements, and now you can also use the latest and greatest g++ version for compiling your applications using wxWidgets without getting thousands of lines of compiler diagnostics. -
In addition to gzip compression, wxWidgets now supports LZMA compression, which can result in much higher compression ratio. This depends on liblzma for the actual [de]compression code, but it can be used comfortably from wxWidgets via wxLZMAInputStream and wxLZMAOutputStream classes. See the manual for more information about integrating liblzma into your build.
-
There has been a number of changes to wxHTML classes in order to make it simpler to produce multi-page reports from HTML. I worked on this as I’m using wxHTML to generate PDF documents using Ulrich Telle’s excellent wxPdfDocument library and it’s now much simpler to paginate these documents, i.e. insert page breaks at the correct locations, than before. These changes haven’t been fully backwards-compatible, so if you previously used wxHtmlDCRenderer::Render() or overrode wxHtmlCell::AdjustPagebreak() in your code, you may need to update it in a relatively simple way as explained in the change log.
-
Stefan Csomor, Daniel Kulp and others have added supported for the upcoming next macOS version: 10.14, a.k.a. Mojave, and, notably, its new dark mode. Some problems might still remain, so please test your Mac applications with Mojave and let us know if you notice anything wrong.
-
No new features have been added to wxMSW port, but a few bug fixes, some of which are worth describing in more details:
-
First, Cătălin Răceanu fixed a long standing bug with window positions beyond approximatively
SHORT_MAX
(i.e. 32000) due to truncation of coordinates to 16 bits inside underlying OS code itself, which meant that we long thought that nothing could be done about it. Cătălin worked around it by scrolling the window to bring the window position inside 16 bit range and then scrolling it back, which seems to work very nicely. -
Another bug which existed for a very long time, related to repositioning children of a scrolled window, was also fixed. This one could result in children of a
wxStaticBox
being offset with respect to it when the box was created as a child ofwxScrolledWindow
in some circumstances, so if you’ve ever run into this mysterious problem, you should be glad to hear that it was really fixed in the latest master. -
Restoring the top-level window geometry now works correctly if the window was maximized when it was closed: it will still be restored maximized, as it already was before, but now it will be maximized on the correct (same) monitor, if there is more than one, and it will also shrink back to its previous size if it’s unmaximized by user.
-
-
In wxGTK there also were “just” bug fixes, including implementing wxTextCtrl::HitTest() for single line controls for which it wasn’t implemented at all before. This incidentally means that wxTimePickerCtrl can now be updated using the mouse, which didn’t work at all before.
-
Finally, even wxQt port got some updates recently with bug fixes from Naser Buhamad and build improvements from Cătălin.
That’s all for now and we’ll try to post more frequent (and smaller and hence simpler to digest) updates here in the future.