mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
Add GtkMenuButton and GtkSearchEntry to gallery
At the same time, remove GtkComboBoxEntry, which no longer exists.
This commit is contained in:
parent
bd3ca2b30e
commit
aa21c34911
@ -296,6 +296,7 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/combo-box.png \
|
||||
$(srcdir)/images/combo-box-entry.png \
|
||||
$(srcdir)/images/entry.png \
|
||||
$(srcdir)/images/search-entry.png \
|
||||
$(srcdir)/images/figure-hierarchical-drawing.png \
|
||||
$(srcdir)/images/figure-windowed-label.png \
|
||||
$(srcdir)/images/file-button.png \
|
||||
@ -310,11 +311,12 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/link-button.png \
|
||||
$(srcdir)/images/list-and-tree.png \
|
||||
$(srcdir)/images/lock-button.png \
|
||||
$(srcdir)/images/lockbutton.png \
|
||||
$(srcdir)/images/lockbutton.png \
|
||||
$(srcdir)/images/lockbutton-locked.png \
|
||||
$(srcdir)/images/lockbutton-unlocked.png \
|
||||
$(srcdir)/images/lockbutton-sorry.png \
|
||||
$(srcdir)/images/menubar.png \
|
||||
$(srcdir)/images/menu-button.png \
|
||||
$(srcdir)/images/messagedialog.png \
|
||||
$(srcdir)/images/multiline-text.png \
|
||||
$(srcdir)/images/notebook.png \
|
||||
|
BIN
docs/reference/gtk/images/menu-button.png
Normal file
BIN
docs/reference/gtk/images/menu-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
docs/reference/gtk/images/search-entry.png
Normal file
BIN
docs/reference/gtk/images/search-entry.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
@ -18,12 +18,12 @@
|
||||
<link linkend="GtkComboBox">
|
||||
<inlinegraphic fileref="combo-box.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkComboBoxEntry">
|
||||
<inlinegraphic fileref="combo-box-entry.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkEntry">
|
||||
<inlinegraphic fileref="entry.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkSearchEntry">
|
||||
<inlinegraphic fileref="search-entry.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkFileChooserButton">
|
||||
<inlinegraphic fileref="file-button.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
@ -54,6 +54,9 @@
|
||||
<link linkend="GtkLockButton">
|
||||
<inlinegraphic fileref="lockbutton.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkMenuButton">
|
||||
<inlinegraphic fileref="menu-button.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
<link linkend="GtkMenuBar">
|
||||
<inlinegraphic fileref="menubar.png" format="PNG"></inlinegraphic>
|
||||
</link>
|
||||
|
@ -224,6 +224,26 @@ create_link_button (void)
|
||||
return new_widget_info ("link-button", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_menu_button (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
GtkWidget *image;
|
||||
GtkWidget *menu;
|
||||
|
||||
widget = gtk_menu_button_new ();
|
||||
image = gtk_image_new ();
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), "emblem-system-symbolic", GTK_ICON_SIZE_MENU);
|
||||
gtk_button_set_image (GTK_BUTTON (widget), image);
|
||||
menu = gtk_menu_new ();
|
||||
gtk_menu_button_set_menu (GTK_MENU_BUTTON (widget), menu);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
|
||||
return new_widget_info ("menu-button", align, SMALL);
|
||||
}
|
||||
|
||||
#define G_TYPE_TEST_PERMISSION (g_test_permission_get_type ())
|
||||
#define G_TEST_PERMISSION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
|
||||
G_TYPE_TEST_PERMISSION, \
|
||||
@ -287,6 +307,20 @@ create_entry (void)
|
||||
return new_widget_info ("entry", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_search_entry (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *align;
|
||||
|
||||
widget = gtk_search_entry_new ();
|
||||
gtk_entry_set_placeholder_text (GTK_ENTRY (widget), "Search...");
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_container_add (GTK_CONTAINER (align), widget);
|
||||
|
||||
return new_widget_info ("search-entry", align, SMALL);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_radio (void)
|
||||
{
|
||||
@ -1233,6 +1267,8 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_lockbutton ());
|
||||
retval = g_list_prepend (retval, create_fontchooserdialog ());
|
||||
retval = g_list_prepend (retval, create_colorchooserdialog ());
|
||||
retval = g_list_prepend (retval, create_menu_button ());
|
||||
retval = g_list_prepend (retval, create_search_entry ());
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user