[gtk/modern-doc-shooter: 7/8] docs: Add a gallery image for GtkEditableLabel
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/modern-doc-shooter: 7/8] docs: Add a gallery image for GtkEditableLabel
- Date: Tue, 4 Aug 2020 04:40:30 +0000 (UTC)
commit 2c306f75c4929030913ece2c9595c04a36123aa8
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Aug 4 00:25:35 2020 -0400
docs: Add a gallery image for GtkEditableLabel
docs/reference/gtk/images/editable-label.png | Bin 0 -> 3893 bytes
docs/reference/gtk/meson.build | 1 +
docs/reference/gtk/visual_index.xml | 3 +++
docs/tools/widgets.c | 22 ++++++++++++++++++++++
4 files changed, 26 insertions(+)
---
diff --git a/docs/reference/gtk/images/editable-label.png b/docs/reference/gtk/images/editable-label.png
new file mode 100644
index 0000000000..e90793052a
Binary files /dev/null and b/docs/reference/gtk/images/editable-label.png differ
diff --git a/docs/reference/gtk/meson.build b/docs/reference/gtk/meson.build
index e695eb110b..70f660bd2f 100644
--- a/docs/reference/gtk/meson.build
+++ b/docs/reference/gtk/meson.build
@@ -262,6 +262,7 @@ images = [
'images/ease-in.png',
'images/ease-out.png',
'images/ease.png',
+ 'images/editable-label.png',
'images/entry.png',
'images/exampleapp.png',
'images/expanders.png',
diff --git a/docs/reference/gtk/visual_index.xml b/docs/reference/gtk/visual_index.xml
index 3a9522ba73..c482979cf8 100644
--- a/docs/reference/gtk/visual_index.xml
+++ b/docs/reference/gtk/visual_index.xml
@@ -126,6 +126,9 @@
<link linkend="GtkPasswordEntry">
<inlinegraphic fileref="password-entry.png" format="PNG"></inlinegraphic>
</link>
+ <link linkend="GtkEditableLabel">
+ <inlinegraphic fileref="editable-label.png" format="PNG"></inlinegraphic>
+ </link>
</para>
</section>
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 9cfc3459be..a636c20e70 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -657,6 +657,27 @@ create_file_button (void)
return new_widget_info ("file-button", vbox, MEDIUM);
}
+static WidgetInfo *
+create_editable_label (void)
+{
+ GtkWidget *vbox;
+ GtkWidget *widget;
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ widget = gtk_editable_label_new ("Editable Label");
+ gtk_box_append (GTK_BOX (vbox), widget);
+ gtk_box_append (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
+ widget = gtk_editable_label_new ("Editable Label");
+ gtk_editable_label_start_editing (GTK_EDITABLE_LABEL (widget));
+ gtk_widget_add_css_class (widget, "frame");
+ gtk_box_append (GTK_BOX (vbox), widget);
+
+ gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
+
+ add_margin (vbox);
+
+ return new_widget_info ("editable-label", vbox, MEDIUM);
+}
static WidgetInfo *
create_separator (void)
{
@@ -1551,6 +1572,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_media_controls ());
retval = g_list_prepend (retval, create_picture ());
retval = g_list_prepend (retval, create_password_entry ());
+ retval = g_list_prepend (retval, create_editable_label ());
return retval;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]