libui/GTK: add uiAreaSetBackgroundColor, not hooked up yet
This commit is contained in:
parent
21e204cdea
commit
bdf9f56152
|
@ -40,6 +40,8 @@ struct uiArea {
|
||||||
GtkDrawingArea *drawingArea;
|
GtkDrawingArea *drawingArea;
|
||||||
areaWidget *area;
|
areaWidget *area;
|
||||||
|
|
||||||
|
int bgR, bgG, bgB;
|
||||||
|
|
||||||
uiAreaHandler *ah;
|
uiAreaHandler *ah;
|
||||||
|
|
||||||
gboolean scrolling;
|
gboolean scrolling;
|
||||||
|
@ -578,6 +580,13 @@ static void areaWidget_class_init(areaWidgetClass *class)
|
||||||
|
|
||||||
uiUnixControlAllDefaults(uiArea)
|
uiUnixControlAllDefaults(uiArea)
|
||||||
|
|
||||||
|
void uiAreaSetBackgroundColor(uiArea *a, int r, int g, int b)
|
||||||
|
{
|
||||||
|
a->bgR = r;
|
||||||
|
a->bgG = g;
|
||||||
|
a->bgB = b;
|
||||||
|
}
|
||||||
|
|
||||||
void uiAreaSetSize(uiArea *a, int width, int height)
|
void uiAreaSetSize(uiArea *a, int width, int height)
|
||||||
{
|
{
|
||||||
if (!a->scrolling)
|
if (!a->scrolling)
|
||||||
|
@ -696,6 +705,8 @@ uiArea *uiNewArea(uiAreaHandler *ah)
|
||||||
|
|
||||||
a->widget = a->areaWidget;
|
a->widget = a->areaWidget;
|
||||||
|
|
||||||
|
uiAreaSetBackgroundColor(a, -1, -1, -1);
|
||||||
|
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -722,6 +733,8 @@ uiArea *uiNewScrollingArea(uiAreaHandler *ah, int width, int height)
|
||||||
|
|
||||||
a->widget = a->swidget;
|
a->widget = a->swidget;
|
||||||
|
|
||||||
|
uiAreaSetBackgroundColor(a, -1, -1, -1);
|
||||||
|
|
||||||
gtk_container_add(a->scontainer, a->areaWidget);
|
gtk_container_add(a->scontainer, a->areaWidget);
|
||||||
// and make the area visible; only the scrolled window's visibility is controlled by libui
|
// and make the area visible; only the scrolled window's visibility is controlled by libui
|
||||||
gtk_widget_show(a->areaWidget);
|
gtk_widget_show(a->areaWidget);
|
||||||
|
|
Loading…
Reference in New Issue