From a023665a5d73a02cfeb842fdb9b660777eb71e6e Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 15 Feb 2010 19:27:19 +0100 Subject: [PATCH] app: if there is no histogram set in the parent class, draw BG and borders here --- app/widgets/gimpcurveview.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/app/widgets/gimpcurveview.c b/app/widgets/gimpcurveview.c index 0fdb9674c5..b794b8532b 100644 --- a/app/widgets/gimpcurveview.c +++ b/app/widgets/gimpcurveview.c @@ -357,6 +357,24 @@ gimp_curve_view_expose (GtkWidget *widget, width = allocation.width - 2 * border - 1; height = allocation.height - 2 * border - 1; + if (! gimp_histogram_view_get_histogram (GIMP_HISTOGRAM_VIEW (view)) && + ! gimp_histogram_view_get_background (GIMP_HISTOGRAM_VIEW (view))) + { + GdkWindow *window = gtk_widget_get_window (widget); + + gdk_draw_rectangle (window, + style->base_gc[GTK_STATE_NORMAL], TRUE, + 0, 0, + allocation.width, + allocation.height); + + /* Draw the outer border */ + gdk_draw_rectangle (window, + style->dark_gc[GTK_STATE_NORMAL], FALSE, + border, border, + width - 1, height - 1); + } + cr = gdk_cairo_create (gtk_widget_get_window (widget)); gdk_cairo_region (cr, event->region);