diff --git a/src/item-bar.c b/src/item-bar.c
index bf33a62..b780ef2 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -250,34 +250,37 @@ ib_draw_cell (ItemBar const * const ib, cairo_t *cr,
 	GdkRGBA rgba;
 	int ascent;
 
+	/* add "button" to the context path */
+	gtk_style_context_save (ctxt);
+	gtk_style_context_add_class (ctxt, GTK_STYLE_CLASS_BUTTON);
 	switch (type) {
 	default:
 	case COL_ROW_NO_SELECTION:
 		font   = ib->normal_font;
-		gtk_style_context_set_state (ctxt, GTK_STATE_NORMAL);
+		gtk_style_context_set_state (ctxt, GTK_STATE_FLAG_NORMAL);
 		gtk_style_context_get_background_color (ctxt, GTK_STATE_NORMAL, &rgba);
 		color = GO_COLOR_FROM_GDK_RGBA (rgba);
-		gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &rgba);
+		gtk_style_context_get_color (ctxt, GTK_STATE_FLAG_NORMAL, &rgba);
 		font_color = GO_COLOR_FROM_GDK_RGBA (rgba);
 		ascent = ib->normal_font_ascent;
 		break;
 
 	case COL_ROW_PARTIAL_SELECTION:
 		font   = ib->bold_font;
-		gtk_style_context_set_state (ctxt, GTK_STATE_NORMAL);
-		gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		gtk_style_context_set_state (ctxt, GTK_STATE_FLAG_PRELIGHT);
+		gtk_style_context_get_background_color (ctxt, GTK_STATE_FLAG_PRELIGHT, &rgba);
 		color = GO_COLOR_FROM_GDK_RGBA (rgba);
-		gtk_style_context_get_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		gtk_style_context_get_color (ctxt, GTK_STATE_FLAG_PRELIGHT, &rgba);
 		font_color = GO_COLOR_FROM_GDK_RGBA (rgba);
 		ascent = ib->bold_font_ascent;
 		break;
 
 	case COL_ROW_FULL_SELECTION:
 		font   = ib->bold_font;
-		gtk_style_context_set_state (ctxt, GTK_STATE_SELECTED);
-		gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		gtk_style_context_set_state (ctxt, GTK_STATE_FLAG_ACTIVE);
+		gtk_style_context_get_background_color (ctxt, GTK_STATE_FLAG_ACTIVE, &rgba);
 		color = GO_COLOR_FROM_GDK_RGBA (rgba);
-		gtk_style_context_get_color (ctxt, GTK_STATE_SELECTED, &rgba);
+		gtk_style_context_get_color (ctxt, GTK_STATE_FLAG_ACTIVE, &rgba);
 		font_color = GO_COLOR_FROM_GDK_RGBA (rgba);
 		ascent = ib->bold_font_ascent;
 		break;
@@ -289,12 +292,14 @@ ib_draw_cell (ItemBar const * const ib, cairo_t *cr,
 		cairo_rectangle (cr, rect->x, rect->y, rect->width, rect->height);
 		cairo_fill (cr);
 		cairo_restore (cr);
+		/* restore style context */
+		gtk_style_context_restore (ctxt);
 		return;
 	}
 
+	gtk_render_background (ctxt, cr, rect->x, rect->y, rect->width + 1, rect->height + 1);
 	gtk_render_frame (ctxt, cr, rect->x, rect->y, rect->width + 1, rect->height + 1);
 	cairo_rectangle (cr, rect->x + 1, rect->y + 1, rect->width - 2, rect->height - 2);
-	cairo_fill_preserve (cr);
 	cairo_restore (cr);
 
 	g_return_if_fail (font != NULL);
@@ -311,6 +316,8 @@ ib_draw_cell (ItemBar const * const ib, cairo_t *cr,
 					 rect->y + (rect->height - PANGO_PIXELS (size.height)) / 2 + ascent);
 	pango_cairo_show_glyph_string (cr, font, ib->pango.glyphs);
 	cairo_restore (cr);
+	/* restore style context */
+	gtk_style_context_restore (ctxt);
 }
 
 int
diff --git a/src/item-grid.c b/src/item-grid.c
index e502a25..f18203b 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -397,7 +397,9 @@ item_grid_draw_region (GocItem const *item, cairo_t *cr, double x_0, double y_0,
 	WorkbookView *wbv = sv_wbv (sv);
 	gboolean show_function_cell_markers = wbv->show_function_cell_markers;
 	gboolean show_extension_markers = wbv->show_extension_markers;
-	GtkStyleContext *ctxt = gtk_widget_get_style_context (GTK_WIDGET (canvas));
+	 /* we use the selected background color from an entry for selected cells */
+	GtkWidget *entry = gtk_entry_new ();
+	GtkStyleContext *ctxt = gtk_widget_get_style_context (entry);
 
 	/* To ensure that far and near borders get drawn we pretend to draw +-2
 	 * pixels around the target area which would include the surrounding
@@ -799,6 +801,8 @@ plain_draw : /* a quick hack to deal with 142267 */
 			ig_cairo_draw_bound (cr, 1, start_y, 1, y);
 	}
 
+	gtk_widget_destroy (entry);
+
 	g_slist_free (merged_used);	   /* merges with bottom in view */
 	g_slist_free (merged_active_seen); /* merges with bottom the view */
 	g_slist_free (merged_unused);	   /* merges in hidden rows */
diff --git a/src/pattern.c b/src/pattern.c
index bf4bcac..50946cc 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -93,7 +93,7 @@ gnumeric_background_set (GnmStyle const *mstyle, cairo_t *cr,
 				(cr, gs_lavender.red, gs_lavender.green, gs_lavender.blue);
 		else {
 			GdkRGBA rgba;
-			gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, &rgba);
+			gtk_style_context_get_background_color (ctxt, GTK_STATE_FLAG_SELECTED, &rgba);
 			cairo_set_source_rgba
 				(cr, gnm_get_light (rgba.red),
 				 gnm_get_light (rgba.green),
