Hi Zelphir, > > - use libadwaita, and only use gtk for those widgets that > > are not provided by libadwaita;
> To be honest, I still don't really know, what libadwaita does or ads > and why it is better to use that. Adw – 1 Building blocks for modern GNOME applications https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/index.html Just learn and use libadwaita - just look at and learn from the g-golf port of the adwaita-1-demo (and read the upstream doc). Among so many advantages it offers over pure gtk apps, it will make your app work fine on mobile devices, including phones (if you follow guidelines, as in the adwaita-1-demo ..) https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/adaptive-layouts.html Not using libadwaita is 'total heresy' - you'll have been warned :) > I am planning to do that. I just find the separate SXML to XML file > step cumbersome and would prefer, if it is all done in one go. Always separate data from coding - a UI spec is pure data. Do not write data in your source code files, it makes them unreadable and difficult to maintain ... this is being teached to s/w engineers ever since computer science exists ... > Perhaps I could live with exporting the XML when the app starts, but > then it would happen every time, often needlessly ... Don't. Just follow advices, the adwaita-1-demo structure, programming style and conventions, my half a million cents :) > I think my problem is, that I am not sure yet, how to create other > widgets from UI file ... Yes, every adwaita-1-demo page defines a separate widget, subclass Adw* and uses/defines its template ... you may look at all of them, they follow a pattern ... But start 'little', just define one template with a few items, then write the scheme code that define the goops subclass, grab some chilld-id as solts, uses a class #:template option ... Then grow from there ... I think I should write a g-golf script to generate an 'empty' app (though now now, I am dead busy on other things). > To reiterate one point though: If there had been a comment above the > SXML telling me, that these are not used directly, but translated to > XML files by a separate build step, I think that would have helped me. That doesn't not make sense: as you know, but you somehow got lost I guess, g-golf 'talks to' upstream libs, they want ui expressed as xml, so using sxml can only be a 'scheme way' of doing things, but at some point before to launch the app (and the separate files, using make ... is by half a million time a better approach then programming those calls in your source code) you must generate the ui files that defines your template(s) ... since ti's what the upstream lib expects ... David
pgpb7kSSdUfET.pgp
Description: OpenPGP digital signature