Fixed some missing pieces in unix/container.c.

This commit is contained in:
Pietro Gagliardi 2015-04-28 12:07:07 -04:00
parent fbe7324c15
commit 1e2dee7ab3
2 changed files with 3 additions and 10 deletions

View File

@ -1,25 +1,15 @@
// 13 august 2014
#include "uipriv_unix.h"
#define gtkXPadding 12
#define gtkYPadding 6
static void uipOSContainer_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
uipOSContainer *c = uipOSContainer(widget);
uiSizing d;
intmax_t x, y, width, height;
gtk_widget_set_allocation(GTK_WIDGET(c), allocation);
if (c->mainControl == NULL)
return;
x = allocation->x + c->marginLeft;
y = allocation->y + c->marginTop;
width = allocation->width - (c->marginLeft + c->marginRight);
height = allocation->height - (c->marginTop + c->marginBottom);
d.xPadding = gtkXPadding;
d.yPadding = gtkYPadding;
uiControlResize(c->mainControl, x, y, width, height, &d);
}

View File

@ -66,6 +66,9 @@ static void containerWidget_remove(GtkContainer *container, GtkWidget *widget)
complain("widget %p not found in containerWidget gtk_container_remove()", widget);
}
#define gtkXPadding 12
#define gtkYPadding 6
static void containerWidget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
{
containerWidget *c = containerWidget(widget);