r/cpp • • Jul 07 '22

WxWidgets 3.2.0 Released

https://wxwidgets.org/news/2022/07/wxwidgets-3.2.0-final-release/
127 Upvotes

14 comments sorted by

28

u/eco_was_taken Jul 07 '22

I just upgraded to 3.1.6 (vcpkg) and once I realized why all my icons were broken and tried out the new wxBitmapBundle I was very happy I could ditch my custom solution for this. Then I saw the SVG support and gave that a shot which worked great so I finally replaced all the imagery in our software with purchased SVGs which look vastly superior to my old programmer art (and far less of a pain to support high-dpi).

I even do some interesting things like treat some SVGs as a template and swap colors on icons to match the colors users pick. It was dead simple and just neat to see.

4

u/fdwr fdwr@github 🔍 Jul 07 '22

Yeah, I'm also opting for SVG in a personal project to avoid multiple assets for DPIs, but the one downside is how blurry the icons become for toolbar (24x24px) and menu icon (16x16px) sizes. So I'm working on adding some extensions to SVG with new attributes for pixel-snapping/grid-fitting using LunaSvg and the Adobe SVG Native library, but now I should see what WxWidgets uses for their SVG rendering.

4

u/eco_was_taken Jul 07 '22

I believe it's nanosvg.

And yeah, it's annoying that vector graphics don't just magically fix blurry icons. I opted for just picking SVGs sized for being pixel perfect at 1.5x scaling. The downscaled ones look good enough and are only going to become more and more rare going forward so I think I'm ok with it.

14

u/[deleted] Jul 07 '22

I like wxWidgets, it kind of just works and isn't hard to pick up. The licensing is nice too

8

u/083BD Jul 07 '22

Still no conan package... 😔

11

u/[deleted] Jul 07 '22

[removed] — view removed comment

3

u/domiran game engine dev Jul 08 '22

Having a GUI editor for wxWidgets would make me switch from Qt.

8

u/degaart Jul 08 '22

wxFormBuilder/wxCrafter

2

u/[deleted] Jul 08 '22

How's wxWidgets when we talk about a complex UI?

Imagine a collection that can be scrolled, each item in the collection is a control with its own layout, text, images, icons, buttons etc.

Each control of the collection will be the same, only the data will change.

That's my use case, how's wxWidgets for that?

2

u/eco_was_taken Jul 09 '22

Generally speaking, you can expect wxWidgets to work basically as well as the native platform GUI because a wrapper of that is all it is for the most part. I would have no trouble doing what you've described in wxWidgets. There are windows to help with variable height rows/columns. If your looking at millions of items you'd likely need to use a "virtual" control of some sort that only does layout/display on demand for visible items.

1

u/SpareSimian Jul 08 '22

I built something like that. I used wxFormBuilder to lay out a prototype wxPanel with all my controls and generated C++ source from that. I can then invoke the constructor for a derived class (to tie each to its own data source) and add that object to a wxScrolledWindow.

0

u/pjmlp Jul 08 '22

You mean like C++ Builder, the epitome of C++ RAD tooling?

Ironically using non standard C++ in GCC or clang seems to be fair game, only others are bad.