[dia/dia-next: 8/59] Use GtkStyleContext to fetch colours
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/dia-next: 8/59] Use GtkStyleContext to fetch colours
- Date: Wed, 9 Jan 2019 18:34:58 +0000 (UTC)
commit 21c1e45ebaee9b8d4d15e6cf339642fa3f7a3d3a
Author: Zander Brown <zbrown gnome org>
Date: Tue Dec 11 00:22:04 2018 +0000
Use GtkStyleContext to fetch colours
lib/diaarrowchooser.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/lib/diaarrowchooser.c b/lib/diaarrowchooser.c
index 9531c806..a0c53004 100644
--- a/lib/diaarrowchooser.c
+++ b/lib/diaarrowchooser.c
@@ -201,10 +201,11 @@ dia_arrow_preview_draw (GtkWidget *widget, cairo_t *ctx)
renderer_ops->begin_render(DIA_RENDERER (renderer), NULL);
renderer_ops->set_linewidth(DIA_RENDERER (renderer), linewidth);
{
- GtkStyle *style = gtk_widget_get_style (widget);
+ GdkRGBA fg, bg;
+ GtkStyle *context = gtk_widget_get_style_context (widget);
/* the text colors are the best approximation to what we had */
- GdkRGBA bg = style->base[gtk_widget_get_state(widget)];
- GdkRGBA fg = style->text[gtk_widget_get_state(widget)];
+ gtk_style_context_get_color (context, gtk_widget_get_state_flags (widget), &fg);
+ gtk_style_context_get_background_color (context, gtk_widget_get_state_flags (widget), &bg);
renderer_ops->draw_line(DIA_RENDERER (renderer), &from, &to, &fg);
arrow_draw (DIA_RENDERER (renderer), arrow_type.type,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]