[evolution/gnome-3-26] Bug 793582 - Add Column dialog doesn't work with dark themes
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-26] Bug 793582 - Add Column dialog doesn't work with dark themes
- Date: Tue, 27 Feb 2018 09:22:21 +0000 (UTC)
commit fdc6c188e291b3a59fb9e87e95cb302077ab0028
Author: Milan Crha <mcrha redhat com>
Date: Wed Feb 21 18:21:09 2018 +0100
Bug 793582 - Add Column dialog doesn't work with dark themes
src/e-util/e-table-field-chooser-item.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/e-util/e-table-field-chooser-item.c b/src/e-util/e-table-field-chooser-item.c
index a63167f..01622e7 100644
--- a/src/e-util/e-table-field-chooser-item.c
+++ b/src/e-util/e-table-field-chooser-item.c
@@ -494,6 +494,7 @@ etfci_draw (GnomeCanvasItem *item,
gint height)
{
ETableFieldChooserItem *etfci = E_TABLE_FIELD_CHOOSER_ITEM (item);
+ GtkStyleContext *style_context;
GnomeCanvas *canvas = item->canvas;
gint rows;
gint y1, y2;
@@ -502,6 +503,12 @@ etfci_draw (GnomeCanvasItem *item,
if (etfci->combined_header == NULL)
return;
+ style_context = gtk_widget_get_style_context (GTK_WIDGET (canvas));
+
+ gtk_style_context_save (style_context);
+ gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_VIEW);
+ gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_HEADER);
+
rows = e_table_header_count (etfci->combined_header);
y1 = y2 = 0;
@@ -533,6 +540,8 @@ etfci_draw (GnomeCanvasItem *item,
cairo_restore (cr);
}
+
+ gtk_style_context_restore (style_context);
}
static GnomeCanvasItem *
@@ -567,6 +576,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
gdouble y)
{
GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (etfci)->canvas);
+ GtkStyleContext *style_context;
GtkTargetList *list;
GdkDragContext *context;
ETableCol *ecol;
@@ -607,6 +617,12 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
etfci->width, button_height);
cr = cairo_create (cs);
+ style_context = gtk_widget_get_style_context (widget);
+
+ gtk_style_context_save (style_context);
+ gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_VIEW);
+ gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_HEADER);
+
e_table_header_draw_button (
cr, ecol,
widget, 0, 0,
@@ -614,6 +630,7 @@ etfci_start_drag (ETableFieldChooserItem *etfci,
etfci->width, button_height,
E_TABLE_COL_ARROW_NONE);
+ gtk_style_context_restore (style_context);
gtk_drag_set_icon_surface (context, cs);
cairo_surface_destroy (cs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]