# HG changeset patch # User Olaf Wintermann # Date 1763734202 -3600 # Node ID 20dff5f878e1489e3b43c7c25e49fcfd478b602f # Parent c2b318b9306273f53bf10f94cc75004a59225cfb add frame container width/height args (Motif) diff -r c2b318b93062 -r 20dff5f878e1 ui/motif/container.c --- a/ui/motif/container.c Thu Nov 20 20:09:00 2025 +0100 +++ b/ui/motif/container.c Fri Nov 21 15:10:02 2025 +0100 @@ -249,6 +249,12 @@ UiLayout layout = UI_ARGS2LAYOUT(args); Widget parent = ui_container_prepare(ctn, &layout, xargs, &n); + if(args->width > 0) { + XtSetArg(xargs[n], XmNwidth, args->width); n++; + } + if(args->height > 0) { + XtSetArg(xargs[n], XmNheight, args->height); n++; + } char *name = args->name ? (char*)args->name : "frame"; Widget frame = XmCreateFrame(parent, name, xargs, n); @@ -697,6 +703,12 @@ int n = 0; XtSetArg(xargs[n], XmNscrollingPolicy, XmAUTOMATIC); n++; + if(args->width > 0) { + XtSetArg(xargs[n], XmNwidth, args->width); n++; + } + if(args->height > 0) { + XtSetArg(xargs[n], XmNheight, args->height); n++; + } Widget parent = ui_container_prepare(ctn, &layout, xargs, &n); Widget scrolledwindow = XmCreateScrolledWindow(parent, "scrolledwindow", xargs, n); diff -r c2b318b93062 -r 20dff5f878e1 ui/ui/container.h --- a/ui/ui/container.h Thu Nov 20 20:09:00 2025 +0100 +++ b/ui/ui/container.h Fri Nov 21 15:10:02 2025 +0100 @@ -98,6 +98,8 @@ int margin_bottom; int colspan; int rowspan; + int width; + int height; const char *name; const char *style_class;