mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
docs: Improve the togglebutton image
Make it actually show toggles.
This commit is contained in:
parent
4ee4c88e43
commit
18f525f7b4
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.0 KiB |
@ -118,9 +118,17 @@ static WidgetInfo *
|
||||
create_toggle_button (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkWidget *button;
|
||||
|
||||
widget = gtk_toggle_button_new_with_mnemonic ("_Toggle Button");
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
|
||||
widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_box_set_homogeneous (GTK_BOX (widget), TRUE);
|
||||
gtk_widget_add_css_class (widget, "linked");
|
||||
button = gtk_toggle_button_new_with_label ("Toggle");
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
|
||||
gtk_box_append (GTK_BOX (widget), button);
|
||||
button = gtk_toggle_button_new_with_label ("Button");
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
|
||||
gtk_box_append (GTK_BOX (widget), button);
|
||||
gtk_widget_set_halign (widget, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (widget, GTK_ALIGN_CENTER);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user