diff --git a/app/widgets/gimpcontainericonview.c b/app/widgets/gimpcontainericonview.c index 3b2b846330..c7c46c9768 100644 --- a/app/widgets/gimpcontainericonview.c +++ b/app/widgets/gimpcontainericonview.c @@ -132,6 +132,8 @@ gimp_container_icon_view_class_init (GimpContainerIconViewClass *klass) widget_class->unmap = gimp_container_icon_view_unmap; widget_class->popup_menu = gimp_container_icon_view_popup_menu; + + gtk_widget_class_set_css_name (widget_class, "GimpContainerIconView"); } static void diff --git a/app/widgets/gimpviewrenderer.c b/app/widgets/gimpviewrenderer.c index de18de6cf5..5bd40ac61d 100644 --- a/app/widgets/gimpviewrenderer.c +++ b/app/widgets/gimpviewrenderer.c @@ -1182,11 +1182,27 @@ gimp_view_render_temp_buf_to_surface (GimpViewRenderer *renderer, GtkStyleContext *style; GdkRGBA *color = NULL; - style = gtk_widget_get_style_context (widget); + /* Try to get the parent's color first to prevent issues with + * changes in preselected backgrounds. If not set though, go for + * the current's widget's color instead */ + style = gtk_widget_get_style_context (gtk_widget_get_parent (widget)); gtk_style_context_get (style, gtk_style_context_get_state (style), GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &color, NULL); + if (color && + color->red == 0 && + color->green == 0 && + color->blue == 0) + { + gdk_rgba_free (color); + + style = gtk_widget_get_style_context (widget); + gtk_style_context_get (style, gtk_style_context_get_state (style), + GTK_STYLE_PROPERTY_BACKGROUND_COLOR, &color, + NULL); + } + if (color) { cairo_set_source_rgb (cr, color->red, color->green, color->blue); diff --git a/themes/Default/common-dark.css b/themes/Default/common-dark.css index 77903f41d7..886534aba2 100644 --- a/themes/Default/common-dark.css +++ b/themes/Default/common-dark.css @@ -10,11 +10,6 @@ @import url("common.css"); -/* Highlight icons in Grid View when hovered over */ -iconview:hover { - background-color: @fg-color; -} - /* * Paned separator handles */ diff --git a/themes/Default/common-light.css b/themes/Default/common-light.css index a16892d011..25e1785e62 100644 --- a/themes/Default/common-light.css +++ b/themes/Default/common-light.css @@ -10,11 +10,6 @@ @import url("common.css"); -/* Highlight icons in Grid View when hovered over */ -iconview:hover { - background-color: @strong-border-color; -} - /* * Paned separator handles */ diff --git a/themes/Default/common.css b/themes/Default/common.css index 63262fed80..cd2682f484 100644 --- a/themes/Default/common.css +++ b/themes/Default/common.css @@ -437,6 +437,20 @@ paned menu separator { padding: 0px; } + +/* Highlight icons in Grid View when hovered over */ +iconview:hover { + border: 2px solid @dimmed-fg-color; +} + +iconview:selected { + border: 2px solid @fg-color; +} + +GimpContainerIconView scrolledwindow { + background-color: @extreme-bg-color; +} + .view button { background-color: @bg-color; border-color: @border-color;