[gimp/gtk3-port: 146/218] libgimpwidgets: port GimpOffsetArea to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 146/218] libgimpwidgets: port GimpOffsetArea to GtkStyleContext
- Date: Fri, 14 Jan 2011 09:32:39 +0000 (UTC)
commit 4fc9f06d2ea7d9c6522a04427ce70b217df13b0a
Author: Michael Natterer <mitch gimp org>
Date: Thu Dec 16 12:25:58 2010 +0100
libgimpwidgets: port GimpOffsetArea to GtkStyleContext
libgimpwidgets/gimpoffsetarea.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/libgimpwidgets/gimpoffsetarea.c b/libgimpwidgets/gimpoffsetarea.c
index 4b733e1..09acf28 100644
--- a/libgimpwidgets/gimpoffsetarea.c
+++ b/libgimpwidgets/gimpoffsetarea.c
@@ -397,12 +397,12 @@ static gboolean
gimp_offset_area_draw (GtkWidget *widget,
cairo_t *cr)
{
- GimpOffsetArea *area = GIMP_OFFSET_AREA (widget);
- GtkStyle *style = gtk_widget_get_style (widget);
- GtkAllocation allocation;
- GdkPixbuf *pixbuf;
- gint w, h;
- gint x, y;
+ GimpOffsetArea *area = GIMP_OFFSET_AREA (widget);
+ GtkStyleContext *context = gtk_widget_get_style_context (widget);
+ GtkAllocation allocation;
+ GdkPixbuf *pixbuf;
+ gint w, h;
+ gint x, y;
gtk_widget_get_allocation (widget, &allocation);
@@ -431,15 +431,12 @@ gimp_offset_area_draw (GtkWidget *widget,
cairo_rectangle (cr, x + 0.5, y + 0.5, w - 1, h - 1);
cairo_set_line_width (cr, 1.0);
- gdk_cairo_set_source_color (cr, &style->black);
+ cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_stroke (cr);
}
else
{
- gtk_paint_shadow (style, cr, GTK_STATE_NORMAL,
- GTK_SHADOW_OUT,
- widget, NULL,
- x, y, w, h);
+ gtk_render_frame (context, cr, x, y, w, h);
}
if (area->orig_width > area->width || area->orig_height > area->height)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]