docs: Add widget-specific items

This commit is contained in:
James Westman 2021-12-15 11:56:33 -06:00
parent 34e78de338
commit 5a4cf58e0e
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6

View file

@ -211,7 +211,7 @@ Basic Usage
.. code-block:: .. code-block::
Gtk.Label { Gtk.Label {
styles: ["dim-label", "title"] styles ["dim-label", "title"]
} }
@ -292,3 +292,53 @@ Basic Usage
} }
Gtk.Label my_label {} Gtk.Label my_label {}
Widget-Specific Items
---------------------
Gtk.ComboBoxText
~~~~~~~~~~~~~~~~
.. code-block::
Gtk.ComboBoxText {
items [
item1: "Item 1",
item2: _("Items can be translated"),
"The item ID is not required",
]
}
Gtk.FileFilter
~~~~~~~~~~~~~~
.. code-block::
Gtk.FileFilter {
mime-types ["image/jpeg", "video/webm"]
patterns ["*.txt"]
suffixes ["png"]
}
Gtk.SizeGroup
~~~~~~~~~~~~~
.. code-block::
Gtk.SizeGroup {
mode: both;
widgets [label1, label2]
}
Gtk.Label label1 {}
Gtk.Label label2 {}
Gtk.StringList
~~~~~~~~~~~~~~
.. code-block::
Gtk.StringList {
strings ["Hello, world!", _("Translated string")]
}