From 5a4cf58e0e0fde92e67e4afaec67ac2a298277ae Mon Sep 17 00:00:00 2001 From: James Westman Date: Wed, 15 Dec 2021 11:56:33 -0600 Subject: [PATCH] docs: Add widget-specific items --- docs/examples.rst | 52 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/docs/examples.rst b/docs/examples.rst index c187be5..e12cdee 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -211,7 +211,7 @@ Basic Usage .. code-block:: Gtk.Label { - styles: ["dim-label", "title"] + styles ["dim-label", "title"] } @@ -292,3 +292,53 @@ Basic Usage } 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")] + }