forked from AuroraMiddleware/gtk
StyleContext: Fix CSS snippet language, node names
The language is useful for parsing tools, such as that of gtkmm, which otherwise assumes these are C snippets and elides them from its generated documentation. The old GtkBlah node names are just plain obsolete.
This commit is contained in:
parent
b1cb34cbbb
commit
491eea5680
@ -1325,13 +1325,13 @@ gtk_style_context_restore (GtkStyleContext *context)
|
||||
* In the CSS file format, a #GtkEntry defining a “search”
|
||||
* class, would be matched by:
|
||||
*
|
||||
* |[
|
||||
* |[ <!-- language="CSS" -->
|
||||
* entry.search { ... }
|
||||
* ]|
|
||||
*
|
||||
* While any widget defining a “search” class would be
|
||||
* matched by:
|
||||
* |[
|
||||
* |[ <!-- language="CSS" -->
|
||||
* .search { ... }
|
||||
* ]|
|
||||
*
|
||||
@ -1495,15 +1495,15 @@ _gtk_style_context_check_region_name (const gchar *str)
|
||||
* In the CSS file format, a #GtkTreeView defining a “row”
|
||||
* region, would be matched by:
|
||||
*
|
||||
* |[
|
||||
* GtkTreeView row { ... }
|
||||
* |[ <!-- language="CSS" -->
|
||||
* treeview row { ... }
|
||||
* ]|
|
||||
*
|
||||
* Pseudo-classes are used for matching @flags, so the two
|
||||
* following rules:
|
||||
* |[
|
||||
* GtkTreeView row:nth-child(even) { ... }
|
||||
* GtkTreeView row:nth-child(odd) { ... }
|
||||
* |[ <!-- language="CSS" -->
|
||||
* treeview row:nth-child(even) { ... }
|
||||
* treeview row:nth-child(odd) { ... }
|
||||
* ]|
|
||||
*
|
||||
* would apply to even and odd rows, respectively.
|
||||
@ -2257,7 +2257,7 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
|
||||
*
|
||||
* As a practical example, a #GtkButton notifying a state transition on
|
||||
* the prelight state:
|
||||
* |[<!-- language="C" -->
|
||||
* |[ <!-- language="C" -->
|
||||
* gtk_style_context_notify_state_change (context,
|
||||
* gtk_widget_get_window (widget),
|
||||
* NULL,
|
||||
@ -2266,12 +2266,12 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
|
||||
* ]|
|
||||
*
|
||||
* Can be handled in the CSS file like this:
|
||||
* |[
|
||||
* GtkButton {
|
||||
* |[ <!-- language="CSS" -->
|
||||
* button {
|
||||
* background-color: #f00
|
||||
* }
|
||||
*
|
||||
* GtkButton:hover {
|
||||
* button:hover {
|
||||
* background-color: #fff;
|
||||
* transition: 200ms linear
|
||||
* }
|
||||
|
Loading…
Reference in New Issue
Block a user