[gtk+] css: Support CSS names for pseudo states



commit 6f889e832c2cb02b70f2d5b891938c571a37c7b1
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 21 08:26:58 2015 -0500

    css: Support CSS names for pseudo states
    
    What we call :insensitive is called :disabled in CSS, and
    :inconsistent is :indeterminate. Recognize these names, but
    still support the old ones.

 gtk/gtkcssselector.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c
index 0647c29..0db8c36 100644
--- a/gtk/gtkcssselector.c
+++ b/gtk/gtkcssselector.c
@@ -736,8 +736,8 @@ print_pseudoclass_state (const GtkCssSelector *selector,
     "active",
     "hover",
     "selected",
-    "insensitive",
-    "inconsistent",
+    "disabled",
+    "indeterminate",
     "focus",
     "backdrop",
     "dir(ltr)",
@@ -1181,7 +1181,9 @@ parse_selector_pseudo_class (GtkCssParser   *parser,
     { "hover",        GTK_STATE_FLAG_PRELIGHT, },
     { "selected",     GTK_STATE_FLAG_SELECTED, },
     { "insensitive",  GTK_STATE_FLAG_INSENSITIVE, },
+    { "disabled",     GTK_STATE_FLAG_INSENSITIVE, },
     { "inconsistent", GTK_STATE_FLAG_INCONSISTENT, },
+    { "indeterminate",GTK_STATE_FLAG_INCONSISTENT, },
     { "focused",      GTK_STATE_FLAG_FOCUSED, },
     { "focus",        GTK_STATE_FLAG_FOCUSED, },
     { "backdrop",     GTK_STATE_FLAG_BACKDROP, },


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