# HG changeset patch # User Olaf Wintermann # Date 1711871449 -7200 # Node ID 1dd2456c51d301f845db37d9d09f8f46be0e7998 # Parent 1a30bf64cb225a2e50a5f9090e0fc9793cef01c2 fix hbox (GTK) diff -r 1a30bf64cb22 -r 1dd2456c51d3 ui/gtk/container.c --- a/ui/gtk/container.c Mon Feb 26 21:37:56 2024 +0100 +++ b/ui/gtk/container.c Sun Mar 31 09:50:49 2024 +0200 @@ -259,12 +259,12 @@ UiContainer *ct = current->container; UI_APPLY_LAYOUT1(current, args); - GtkWidget *vbox = ui_gtk_vbox_new(args.spacing); - GtkWidget *widget = args.margin > 0 ? box_set_margin(vbox, args.margin) : vbox; + GtkWidget *box = type == UI_CONTAINER_VBOX ? ui_gtk_vbox_new(args.spacing) : ui_gtk_hbox_new(args.spacing); + GtkWidget *widget = args.margin > 0 ? box_set_margin(box, args.margin) : box; ct->add(ct, widget, TRUE); - UiObject *newobj = uic_object_new(obj, vbox); - newobj->container = ui_box_container(obj, vbox); + UiObject *newobj = uic_object_new(obj, box); + newobj->container = ui_box_container(obj, box); uic_obj_add(obj, newobj); return widget;