Why do you need such "modern C++ GUI library" then?
Check my Sciter Notes. Screenshots of the application for each platform are on its frontpage: https://notes.sciter.com/
This application uses the same UI definitions on any platform (https://github.com/c-smile/sciter-sdk/tree/master/notes/res) and the same C++ code.
Very nice library! But you only support PCs. You have same structure, and same UX (mouse+keyboard, relatively large screen) on all of them, you only need to adjust for DPI scaling, and for window resize.
About hardcoded pixel sizes, sometimes they’re OK. Apple did that in iOS, worked well for them. When they released iPhone 4, they just doubled the DPI. And when they released iPad, they made developers replace complete views and it made sense because it was much different UX.
I’m not saying that library is good. Apple has separate UI markup language, and they have decent UI designer in XCode for that. The feature is IMO required for a modern GUI framework and it’s missing in Nana.
Also, GPU-based rendering is nice to have nowadays, see MS XAML or Google Flutter.
I once needed to create rich GUI for embedded Linux app on top of essentially raw hardware, drm, kms, gles. I’ve compiled C shared library exposing some wrappers around NanoVG API https://github.com/memononen/nanovg then implemented touchscreen input, controls, styles and animations in C# using .NET core. Worked well for my requirements.
Not necessarily. As always with software design, there’re tradeoffs involved.
Separate styles work when the stuff you’re styling is content to consume, not rich GUI to edit/produce. For rich GUI that works well on every platform you need different structure, not just different styles.
Separate styles work when the devices are not too different. If they are very different, like PC and smartwatch, you probably need different structure even for readonly content.
There’re frameworks/design patterns, like MVVM for XAML, MVC for iOS and old-school web, where you can replace complete views while reusing the rest of the app.