Add black background behind preview

This commit is contained in:
Martijn Braam 2020-11-28 16:21:32 +01:00
parent 0a8a0b1cff
commit c591e60ebd
1 changed files with 5 additions and 0 deletions

5
main.c
View File

@ -297,10 +297,15 @@ preview_draw(GtkWidget *widget, cairo_t *cr, gpointer data)
return FALSE;
}
// Clear preview area with black
cairo_paint(cr);
// Draw camera preview
if (surface) {
draw_surface_scaled_centered(cr, preview_width, preview_height, surface);
}
// Draw control overlay
cairo_set_source_surface(cr, status_surface, 0, 0);
cairo_paint(cr);
return FALSE;