More work. uiSizing on Unix done.
This commit is contained in:
parent
039bc5083b
commit
58a4b5d2da
|
@ -17,4 +17,7 @@ struct uiSizingSys {
|
|||
// this structure currently left blank
|
||||
};
|
||||
|
||||
// This creates a uiSizing for Unix systems.
|
||||
_UI_EXTERN uiSizing *uiUnixNewSizing(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,7 +35,7 @@ static void singleWidgetResize(uiControl *c, intmax_t x, intmax_t y, intmax_t wi
|
|||
|
||||
static uiSizing *singleWidgetSizing(uiControl *c)
|
||||
{
|
||||
// TODO
|
||||
return uiUnixNewSizing();
|
||||
}
|
||||
|
||||
static void singleWidgetCommitShow(uiControl *c)
|
||||
|
|
|
@ -11,3 +11,23 @@ void complain(const char *fmt, ...)
|
|||
va_end(ap);
|
||||
g_error("[libui] %s\n", msg);
|
||||
}
|
||||
|
||||
#define gtkXPadding 12
|
||||
#define gtkYPadding 6
|
||||
|
||||
uiSizing *uiUnixNewSizing(void)
|
||||
{
|
||||
uiSizing *d;
|
||||
|
||||
d = uiNew(uiSizing);
|
||||
d->XPadding = gtkXPadding;
|
||||
d->YPadding = gtkYPadding;
|
||||
d->Sys = uiNew(uiSizingSys);
|
||||
return d;
|
||||
}
|
||||
|
||||
void uiFreeSizing(uiSizing *d)
|
||||
{
|
||||
uiFree(d->Sys);
|
||||
uiFree(d);
|
||||
}
|
||||
|
|
|
@ -61,9 +61,6 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue