forked from AuroraMiddleware/gtk
gtk-demo: Fix the overlay demo
We must make the label and the entry separate overlays, or the entry will also be clickthru.
This commit is contained in:
parent
6d75d0966a
commit
f352a0ec2b
@ -64,11 +64,15 @@ do_overlay (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("<span foreground='blue' weight='ultrabold' font='40'>Numbers</span>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
gtk_widget_set_margin_top (label, 8);
|
||||
gtk_widget_set_margin_bottom (label, 8);
|
||||
gtk_widget_set_margin_bottom (label, 50);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
|
||||
gtk_widget_set_margin_top (entry, 8);
|
||||
gtk_widget_set_margin_top (entry, 50);
|
||||
gtk_widget_set_margin_bottom (entry, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user