add title separator colors to the preview
authorDana Jansens <danakj@orodu.net>
Sun, 3 Jun 2007 19:39:19 +0000 (19:39 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 3 Jun 2007 19:39:19 +0000 (19:39 +0000)
src/preview.c

index b3af411..f8ca248 100644 (file)
@@ -415,6 +415,19 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout,
                                               0, 0, x, y, w, h);
     }
 
+    /* title separator colour */
+    x = theme->fbwidth;
+    y = theme->fbwidth + theme->title_height;
+    w = width - 2*theme->fbwidth;
+    h = theme->fbwidth;
+
+    scratch = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, w, h);
+    gdk_pixbuf_fill(scratch, rr_color_pixel(focus ?
+                                            theme->title_separator_focused_color :
+                                            theme->title_separator_unfocused_color));
+
+    gdk_pixbuf_copy_area(scratch, 0, 0, w, h, pixbuf, x, y);
+
     /* retarded way of adding client colour */
     x = theme->fbwidth;
     y = theme->title_height + 2*theme->fbwidth;