[nautilus/list-view-dim-fts-snippet-with-alpha: 10/10] list-view: Dim fts snippet with alpha, not color.



commit 804e286f719b3b6cc1527e7911bb2281d505ef0e
Author: António Fernandes <antoniof gnome org>
Date:   Fri Feb 23 15:13:39 2018 +0000

    list-view: Dim fts snippet with alpha, not color.
    
    The full text search snippet shares the cell with the finename,
    as a single string. Therefore, we cannot rely on the dim-label
    style, so we set it's color to grey using Pango markup.
    
    But hardcoding colors is bad for theming.
    
    Instead, use alpha transparency to dim fts snippet in a
    color-agnostic way.

 src/nautilus-list-view.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 113df3358..304a56eb0 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1713,7 +1713,7 @@ filename_cell_data_func (GtkTreeViewColumn *column,
                 escaped_text = g_markup_escape_text (replaced_text, -1);
 
                 g_string_append_printf (display_text,
-                                        " <small><span color='grey'><b>%s</b></span></small>",
+                                        " <small><span alpha='50%%'><b>%s</b></span></small>",
                                         escaped_text);
             }
         }


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