Commit 09eda804 authored by Matthias Clasen's avatar Matthias Clasen

docs: Add GtkWindowControls to the gallery

parent 37d4932b
......@@ -367,6 +367,7 @@ images = [
'images/video.png',
'images/volumebutton.png',
'images/widget-hvalign.png',
'images/windowcontrols.png',
'images/window-default.png',
'images/window.png',
'images/rich-list.png',
......
......@@ -51,6 +51,9 @@
<link linkend="GtkMediaControls">
<inlinegraphic fileref="media-controls.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkWindowControls">
<inlinegraphic fileref="windowcontrols.png" format="PNG"></inlinegraphic>
</link>
</para>
</section>
......
......@@ -1497,6 +1497,26 @@ create_gl_area (void)
return info;
}
static WidgetInfo *
create_window_controls (void)
{
GtkWidget *controls;
GtkWidget *vbox;
controls = gtk_window_controls_new (GTK_PACK_END);
gtk_window_controls_set_decoration_layout (GTK_WINDOW_CONTROLS (controls),
":minimize,maximize,close");
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_widget_set_halign (controls, GTK_ALIGN_CENTER);
gtk_widget_set_valign (controls, GTK_ALIGN_CENTER);
gtk_box_append (GTK_BOX (vbox), controls);
gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Window Controls"));
add_margin (vbox);
return new_widget_info ("windowcontrols", vbox, SMALL);
}
GList *
get_all_widgets (void)
{
......@@ -1562,6 +1582,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_password_entry ());
retval = g_list_prepend (retval, create_editable_label ());
retval = g_list_prepend (retval, create_drop_down ());
retval = g_list_prepend (retval, create_window_controls ());
return retval;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment