Adwaita Application¶
Adw.Application extends Gtk.Application to ease some task
related to creating applications for GNOME.
See also
We previously touched Gtk.Application in this tutorial.
Adwaita also have Adw.ApplicationWindow, it’s a subclass of Gtk.ApplicationWindow
that provides the same “freform” features from Adw.Window.
Note
Using Adw.Application will also call Adw.init() for you, this
function initialize de library, making sure that translations, types,
themes, icons and stylesheets needed by the library are set up properly.
Stylesheets¶
If you make use of Gio.Resource, Adw.Application will
automatically load stylesheets located in the application’s resource base path.
This way you don’t need to manually load stylesheets, and it will load the
matching stylesheets depending on the system appearance settings exposed by
Adw.StyleManager.
style.csscontains the base styles.style-dark.csscontains styles only used whenAdw.StyleManager.props.darkisTrue.style-hc.csscontains styles used whenAdw.StyleManager.props.high_contrastisTrue.style-hc-dark.csscontains styles used whenAdw.StyleManager.props.high_contrastandAdw.StyleManager.props.darkare bothTrue.