| 1 |
.. currentmodule:: gi.repository |
| 2 |
|
| 3 |
Adwaita Application |
| 4 |
=================== |
| 5 |
|
| 6 |
:class:`Adw.Application` extends :class:`Gtk.Application` to ease some task |
| 7 |
related to creating applications for GNOME. |
| 8 |
|
| 9 |
.. seealso:: |
| 10 |
|
| 11 |
We previously touched :class:`Gtk.Application` in :doc:`this tutorial </tutorials/gtk4/application>`. |
| 12 |
|
| 13 |
|
| 14 |
Adwaita also have :class:`Adw.ApplicationWindow`, it's a subclass of :class:`Gtk.ApplicationWindow` |
| 15 |
that provides the same "freform" features from :class:`Adw.Window`. |
| 16 |
|
| 17 |
.. note:: |
| 18 |
Using :class:`Adw.Application` will also call :func:`Adw.init` for you, this |
| 19 |
function initialize de library, making sure that translations, types, |
| 20 |
themes, icons and stylesheets needed by the library are set up properly. |
| 21 |
|
| 22 |
|
| 23 |
Stylesheets |
| 24 |
----------- |
| 25 |
|
| 26 |
If you make use of :class:`Gio.Resource`, :class:`Adw.Application` will |
| 27 |
automatically load stylesheets located in the application's resource base path. |
| 28 |
|
| 29 |
This way you don't need to manually load stylesheets, and it will load the |
| 30 |
matching stylesheets depending on the system appearance settings exposed by |
| 31 |
:class:`Adw.StyleManager`. |
| 32 |
|
| 33 |
Have a look at the `libadwaita styling documentation <https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/styles-and-appearance.html>`__. |