mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-11 16:18:06 -05:00
Fix misplaced separator in GTK3 dialog boxes.
When I abandoned GtkDialog for GtkWindow (in dc11417ae), I manually added a horizontal GtkSeparator between the content and action areas. Or rather, I tried to - but I forgot that gtk_box_pack_end works in the opposite order, so that you have to add the bottom-most element first and then the one you want to appear above it. So my separator was below the action area, rather than between it and the content area.
This commit is contained in:
parent
06cf210552
commit
24967601bb
@ -156,14 +156,15 @@ void our_dialog_set_action_area(GtkWindow *dlg, GtkWidget *w)
|
||||
/* GtkWindow is a GtkBin, hence contains exactly one child, which
|
||||
* here we always expect to be a vbox */
|
||||
GtkBox *vbox = GTK_BOX(gtk_bin_get_child(GTK_BIN(dlg)));
|
||||
|
||||
GtkWidget *sep = gtk_hseparator_new();
|
||||
gtk_box_pack_end(vbox, sep, FALSE, TRUE, 0);
|
||||
gtk_widget_show(sep);
|
||||
GtkWidget *sep;
|
||||
|
||||
g_object_set(G_OBJECT(w), "margin", 8, (const char *)NULL);
|
||||
gtk_box_pack_end(vbox, w, FALSE, TRUE, 0);
|
||||
|
||||
sep = gtk_hseparator_new();
|
||||
gtk_box_pack_end(vbox, sep, FALSE, TRUE, 0);
|
||||
gtk_widget_show(sep);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user