forked from AuroraMiddleware/gtk
Add the caret-color CSS property
This property is defined in http://www.w3.org/TR/css3-ui/#caret-color. We also add a -gtk-secondary-caret-color property, since GTK+ has supported differently colored split cursors in the past. Unlike CSS, we don't support the weakly defined auto keyword, and just use currentColor as the initial value.
This commit is contained in:
parent
feba047574
commit
fdba244c38
@ -122,6 +122,8 @@ gtk_css_value_color_get_fallback (guint property_id,
|
||||
case GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR:
|
||||
case GTK_CSS_PROPERTY_BORDER_LEFT_COLOR:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_COLOR:
|
||||
case GTK_CSS_PROPERTY_CARET_COLOR:
|
||||
case GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR:
|
||||
return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)),
|
||||
property_id,
|
||||
provider,
|
||||
|
@ -1801,5 +1801,23 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
bindings_value_assign,
|
||||
_gtk_css_array_value_new (_gtk_css_string_value_new (NULL)));
|
||||
_gtk_style_property_add_alias ("-gtk-key-bindings", "gtk-key-bindings");
|
||||
}
|
||||
|
||||
gtk_css_style_property_register ("caret-color",
|
||||
GTK_CSS_PROPERTY_CARET_COLOR,
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
||||
GTK_CSS_AFFECTS_TEXT,
|
||||
color_parse,
|
||||
color_query,
|
||||
color_assign,
|
||||
_gtk_css_color_value_new_current_color ());
|
||||
gtk_css_style_property_register ("-gtk-secondary-caret-color",
|
||||
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
||||
GDK_TYPE_RGBA,
|
||||
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
||||
GTK_CSS_AFFECTS_TEXT,
|
||||
color_parse,
|
||||
color_query,
|
||||
color_assign,
|
||||
_gtk_css_color_value_new_current_color ());
|
||||
}
|
||||
|
@ -222,6 +222,8 @@ enum { /*< skip >*/
|
||||
GTK_CSS_PROPERTY_ICON_PALETTE,
|
||||
GTK_CSS_PROPERTY_ENGINE,
|
||||
GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
|
||||
GTK_CSS_PROPERTY_CARET_COLOR,
|
||||
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
||||
/* add more */
|
||||
GTK_CSS_PROPERTY_N_PROPERTIES
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user