Add color and font chooser to the widget gallery

This commit is contained in:
Matthias Clasen 2012-02-14 23:48:36 -05:00
parent fae1be06cd
commit f9be52cb2f
5 changed files with 37 additions and 0 deletions

View File

@ -287,6 +287,7 @@ HTML_IMAGES = \
$(srcdir)/images/check-button.png \
$(srcdir)/images/color-button.png \
$(srcdir)/images/colorsel.png \
$(srcdir)/images/colorchooser.png \
$(srcdir)/images/combo-box.png \
$(srcdir)/images/combo-box-entry.png \
$(srcdir)/images/entry.png \
@ -296,6 +297,7 @@ HTML_IMAGES = \
$(srcdir)/images/filechooser.png \
$(srcdir)/images/font-button.png \
$(srcdir)/images/fontsel.png \
$(srcdir)/images/fontchooser.png \
$(srcdir)/images/frame.png \
$(srcdir)/images/icon-view.png \
$(srcdir)/images/image.png \

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -135,4 +135,10 @@
<link linkend="GtkSwitch">
<inlinegraphic fileref="switch.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkColorChooserDialog">
<inlinegraphic fileref="colorchooser.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkFontChooserDialog">
<inlinegraphic fileref="fontchooser.png" format="PNG"></inlinegraphic>
</link>
</para>

View File

@ -1154,6 +1154,33 @@ create_appchooserdialog (void)
return info;
}
static WidgetInfo *
create_fontchooserdialog (void)
{
WidgetInfo *info;
GtkWidget *widget;
widget = gtk_font_chooser_dialog_new ("Font Chooser Dialog", NULL);
gtk_window_set_default_size (GTK_WINDOW (widget), 200, 300);
info = new_widget_info ("fontchooser", widget, ASIS);
info->include_decorations = TRUE;
return info;
}
static WidgetInfo *
create_colorchooserdialog (void)
{
WidgetInfo *info;
GtkWidget *widget;
widget = gtk_color_chooser_dialog_new ("Color Chooser Dialog", NULL);
info = new_widget_info ("colorchooser", widget, ASIS);
info->include_decorations = TRUE;
return info;
}
GList *
get_all_widgets (void)
{
@ -1204,6 +1231,8 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_appchooserbutton ());
retval = g_list_prepend (retval, create_appchooserdialog ());
retval = g_list_prepend (retval, create_lockbutton ());
retval = g_list_prepend (retval, create_fontchooserdialog ());
retval = g_list_prepend (retval, create_colorchooserdialog ());
return retval;
}