mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 14:20:21 +00:00
docs: Fix the GtkVolumeButton gallery image
Give up on showing the popup, we don't do that for other buttons either.
This commit is contained in:
parent
dffe6b87e4
commit
a70c9c69a0
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.0 KiB |
@ -1170,25 +1170,18 @@ create_spinner (void)
|
|||||||
static WidgetInfo *
|
static WidgetInfo *
|
||||||
create_volume_button (void)
|
create_volume_button (void)
|
||||||
{
|
{
|
||||||
GtkWidget *button, *box;
|
GtkWidget *widget, *vbox;
|
||||||
GtkWidget *widget;
|
|
||||||
GtkWidget *popup;
|
|
||||||
|
|
||||||
widget = gtk_window_new ();
|
widget = gtk_volume_button_new ();
|
||||||
gtk_widget_set_size_request (widget, 100, 250);
|
gtk_scale_button_set_value (GTK_SCALE_BUTTON (widget), 33);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
|
||||||
gtk_window_set_child (GTK_WINDOW (widget), box);
|
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
|
||||||
|
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
|
||||||
|
gtk_box_append (GTK_BOX (vbox), widget);
|
||||||
|
gtk_box_append (GTK_BOX (vbox), gtk_label_new ("Volume Button"));
|
||||||
|
|
||||||
button = gtk_volume_button_new ();
|
return new_widget_info ("volumebutton", vbox, SMALL);
|
||||||
gtk_box_append (GTK_BOX (box), button);
|
|
||||||
|
|
||||||
gtk_scale_button_set_value (GTK_SCALE_BUTTON (button), 33);
|
|
||||||
popup = gtk_scale_button_get_popup (GTK_SCALE_BUTTON (button));
|
|
||||||
gtk_widget_realize (widget);
|
|
||||||
gtk_widget_show (popup);
|
|
||||||
|
|
||||||
return new_widget_info ("volumebutton", widget, ASIS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static WidgetInfo *
|
static WidgetInfo *
|
||||||
|
Loading…
Reference in New Issue
Block a user