app: fix drawing the focus around the selected color in GimpPaletteView

The grid lines are always black, so always draw a black/white focus
line and ignore theme colors.

(cherry picked from commit 4cc6f18cc9)
This commit is contained in:
Michael Natterer 2018-06-18 19:18:34 +02:00
parent 5ebc7909a3
commit 89776dbff5
1 changed files with 2 additions and 6 deletions

View File

@ -173,9 +173,7 @@ gimp_palette_view_draw (GtkWidget *widget,
if (view->renderer->viewable && pal_view->selected)
{
GimpViewRendererPalette *renderer;
GtkStyleContext *style = gtk_widget_get_style_context (widget);
GtkAllocation allocation;
GdkRGBA color;
gint row, col;
renderer = GIMP_VIEW_RENDERER_PALETTE (view->renderer);
@ -192,14 +190,12 @@ gimp_palette_view_draw (GtkWidget *widget,
renderer->cell_height);
cairo_set_line_width (cr, 1.0);
gtk_style_context_get_color (style, GTK_STATE_FLAG_SELECTED, &color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
cairo_stroke_preserve (cr);
if (gimp_cairo_set_focus_line_pattern (cr, widget))
{
gtk_style_context_get_color (style, 0, &color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
cairo_stroke (cr);
}
}