docs: Add a gallery image for GtkEditableLabel

This commit is contained in:
Matthias Clasen 2020-08-04 00:25:35 -04:00
parent d7cd28c641
commit 2c306f75c4
4 changed files with 26 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -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',

View File

@ -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>

View File

@ -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;
}