[recipes] edit-page: set Directions link color from context



commit 771952d4c8067570e88b457f2058bfaa9058deca
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue Jan 17 10:13:50 2017 +0530

    edit-page: set Directions link color from context
    
    Hardcoding blue color for links was creating contrast issue
    in dark theme.
    
    So let the link color be set based on context
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777367

 src/gr-edit-page.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index acd010a..b980e80 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -927,8 +927,10 @@ recipe_row_activated (GtkListBox    *list,
         GtkTextIter start, end;
         GtkTextTag *tag;
         GdkRGBA color;
+        GtkStateFlags state = gtk_widget_get_state_flags (GTK_WIDGET (self->instructions_field));
+        GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET (self->instructions_field));
 
-        gdk_rgba_parse (&color, "blue");
+        gtk_style_context_get_color (context, state | GTK_STATE_FLAG_LINK, &color);
 
         recipe = GR_RECIPE (g_object_get_data (G_OBJECT (row), "recipe"));
         id = gr_recipe_get_id (recipe);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]