summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-08-04 19:11:43 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-08-04 19:11:43 -0400
commit1067627131ded97ece700dca73ef0502af075463 (patch)
tree0c13048b882502c231a077d4783ce1f10c0febb1 /docs
parent71d95cecd79c60d5faa5e2787d45faf7f2b399c7 (diff)
downloadgtk+-1067627131ded97ece700dca73ef0502af075463.tar.gz
Add labels to some visual index images
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/gtk/images/lock-button.pngbin2260 -> 3496 bytes
-rw-r--r--docs/reference/gtk/images/menu-button.pngbin1809 -> 2881 bytes
-rw-r--r--docs/tools/widgets.c46
3 files changed, 38 insertions, 8 deletions
diff --git a/docs/reference/gtk/images/lock-button.png b/docs/reference/gtk/images/lock-button.png
index 28ce08ae0d..c46f88eab5 100644
--- a/docs/reference/gtk/images/lock-button.png
+++ b/docs/reference/gtk/images/lock-button.png
Binary files differ
diff --git a/docs/reference/gtk/images/menu-button.png b/docs/reference/gtk/images/menu-button.png
index 71ced34f9a..e1a0393d32 100644
--- a/docs/reference/gtk/images/menu-button.png
+++ b/docs/reference/gtk/images/menu-button.png
Binary files differ
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 708f9b5588..87e539eaeb 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -228,9 +228,9 @@ static WidgetInfo *
create_menu_button (void)
{
GtkWidget *widget;
- GtkWidget *align;
GtkWidget *image;
GtkWidget *menu;
+ GtkWidget *vbox;
widget = gtk_menu_button_new ();
image = gtk_image_new ();
@@ -238,10 +238,15 @@ create_menu_button (void)
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);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+ gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
+
+ gtk_box_pack_start (GTK_BOX (vbox), gtk_label_new ("Menu Button"), TRUE, TRUE, 0);
+
+ return new_widget_info ("menu-button", vbox, SMALL);
}
#define G_TYPE_TEST_PERMISSION (g_test_permission_get_type ())
@@ -282,14 +287,20 @@ g_test_permission_class_init (GTestPermissionClass *class)
static WidgetInfo *
create_lockbutton (void)
{
+ GtkWidget *vbox;
GtkWidget *widget;
- GtkWidget *align;
widget = gtk_lock_button_new (g_object_new (G_TYPE_TEST_PERMISSION, NULL));
- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (align), widget);
- return new_widget_info ("lock-button", align, SMALL);
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+ gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_label_new ("Lock Button"),
+ FALSE, FALSE, 0);
+ gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
+
+ return new_widget_info ("lock-button", vbox, SMALL);
}
static WidgetInfo *
@@ -988,6 +999,24 @@ create_progressbar (void)
}
static WidgetInfo *
+create_level_bar (void)
+{
+ GtkWidget *vbox;
+ GtkWidget *widget;
+
+ widget = gtk_level_bar_new ();
+ gtk_level_bar_set_value (GTK_LEVEL_BAR (widget), 0.333);
+
+ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
+ gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ gtk_label_new ("Level Bar"),
+ FALSE, FALSE, 0);
+
+ return new_widget_info ("levelbar", vbox, SMALL);
+}
+
+static WidgetInfo *
create_scrolledwindow (void)
{
GtkWidget *scrolledwin, *label;
@@ -1269,6 +1298,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_colorchooserdialog ());
retval = g_list_prepend (retval, create_menu_button ());
retval = g_list_prepend (retval, create_search_entry ());
+ retval = g_list_prepend (retval, create_level_bar ());
return retval;
}