aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-12-05 04:20:52 +0100
committerStapleButter <thetotalworm@gmail.com>2017-12-05 04:20:52 +0100
commit746b4db3829d830813a2f79a958a645935eec51d (patch)
tree17189b9d85a7bfee8bac58ab0245d8a59453c2d7 /src/libui_sdl
parentdd529f0f5cdf37e4196c1793c3c538be8ebe4cd9 (diff)
libui/GTK: add area BG color support
Diffstat (limited to 'src/libui_sdl')
-rw-r--r--src/libui_sdl/libui/unix/area.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/unix/area.c b/src/libui_sdl/libui/unix/area.c
index bdc0f3e..ea31676 100644
--- a/src/libui_sdl/libui/unix/area.c
+++ b/src/libui_sdl/libui/unix/area.c
@@ -134,6 +134,12 @@ static gboolean areaWidget_draw(GtkWidget *w, cairo_t *cr)
dp.ClipY = clipY0;
dp.ClipWidth = clipX1 - clipX0;
dp.ClipHeight = clipY1 - clipY0;
+
+ if (a->bgR != -1)
+ {
+ cairo_set_source_rgb(cr, a->bgR/255.0, a->bgG/255.0, a->bgB/255.0);
+ cairo_paint(cr);
+ }
// no need to save or restore the graphics state to reset transformations; GTK+ does that for us
(*(a->ah->Draw))(a->ah, a, &dp);