[gtk+/wip/matthiasc/visible-focus: 2/3] Support the new state in CSS selectors



commit 3fc619cd324fec7cbbbd8cd073a93ff939f3b459
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Aug 28 22:26:30 2017 -0400

    Support the new state in CSS selectors
    
    Make :focus(visible) match the new state.

 gtk/gtkcssselector.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c
index 40c4355..fedefaf 100644
--- a/gtk/gtkcssselector.c
+++ b/gtk/gtkcssselector.c
@@ -683,7 +683,8 @@ gtk_css_pseudoclass_name (GtkStateFlags state)
     "link",
     "visited",
     "checked",
-    "drop(active)"
+    "drop(active)",
+    "focus(visible)"
   };
   guint i;
 
@@ -1116,6 +1117,7 @@ parse_selector_pseudo_class (GtkCssParser   *parser,
     { "selected",      0, GTK_STATE_FLAG_SELECTED, },
     { "disabled",      0, GTK_STATE_FLAG_INSENSITIVE, },
     { "indeterminate", 0, GTK_STATE_FLAG_INCONSISTENT, },
+    { "focus(visible)",0, GTK_STATE_FLAG_FOCUS_VISIBLE, },
     { "focus",         0, GTK_STATE_FLAG_FOCUSED, },
     { "backdrop",      0, GTK_STATE_FLAG_BACKDROP, },
     { "dir(ltr)",      0, GTK_STATE_FLAG_DIR_LTR, },


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