summaryrefslogtreecommitdiff
path: root/demos/gtk-demo/transparent.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/gtk-demo/transparent.c')
-rw-r--r--demos/gtk-demo/transparent.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/demos/gtk-demo/transparent.c b/demos/gtk-demo/transparent.c
index 65373b8943..ae9873a4e9 100644
--- a/demos/gtk-demo/transparent.c
+++ b/demos/gtk-demo/transparent.c
@@ -33,7 +33,10 @@ do_transparent (GtkWidget *do_widget)
button = gtk_button_new_with_label ("Don't click this button!");
label = gtk_bin_get_child (GTK_BIN (button));
- g_object_set (label, "margin", 50, NULL);
+ gtk_widget_set_margin_start (label, 50);
+ gtk_widget_set_margin_end (label, 50);
+ gtk_widget_set_margin_top (label, 50);
+ gtk_widget_set_margin_bottom (label, 50);
gtk_widget_set_opacity (button, 0.7);
gtk_widget_set_halign (button, GTK_ALIGN_FILL);
@@ -43,7 +46,10 @@ do_transparent (GtkWidget *do_widget)
button = gtk_button_new_with_label ("Maybe this one?");
label = gtk_bin_get_child (GTK_BIN (button));
- g_object_set (label, "margin", 50, NULL);
+ gtk_widget_set_margin_start (label, 50);
+ gtk_widget_set_margin_end (label, 50);
+ gtk_widget_set_margin_top (label, 50);
+ gtk_widget_set_margin_bottom (label, 50);
gtk_widget_set_opacity (button, 0.7);
gtk_widget_set_halign (button, GTK_ALIGN_FILL);