docs: Add gallery image for GtkPasswordEntry

This commit is contained in:
Matthias Clasen 2020-08-04 00:16:22 -04:00
parent 92cb629640
commit d7cd28c641
4 changed files with 22 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -331,6 +331,7 @@ images = [
'images/options.png',
'images/pagesetupdialog.png',
'images/panes.png',
'images/password-entry.png',
'images/picture.png',
'images/placessidebar.png',
'images/popup-anchors.png',

View File

@ -123,6 +123,9 @@
<link linkend="GtkSearchEntry">
<inlinegraphic fileref="search-entry.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkPasswordEntry">
<inlinegraphic fileref="password-entry.png" format="PNG"></inlinegraphic>
</link>
</para>
</section>

View File

@ -231,6 +231,23 @@ create_entry (void)
return new_widget_info ("entry", widget, SMALL);
}
static WidgetInfo *
create_password_entry (void)
{
GtkWidget *widget;
widget = gtk_password_entry_new ();
gtk_password_entry_set_show_peek_icon (GTK_PASSWORD_ENTRY (widget), TRUE);
gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
gtk_editable_set_text (GTK_EDITABLE (widget), "Entry");
gtk_editable_set_position (GTK_EDITABLE (widget), -1);
add_margin (widget);
return new_widget_info ("password-entry", widget, SMALL);
}
static WidgetInfo *
create_search_entry (void)
{
@ -1533,6 +1550,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_video ());
retval = g_list_prepend (retval, create_media_controls ());
retval = g_list_prepend (retval, create_picture ());
retval = g_list_prepend (retval, create_password_entry ());
return retval;
}