[gtk+] flowbox: Add element names
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] flowbox: Add element names
- Date: Thu, 5 Nov 2015 20:24:16 +0000 (UTC)
commit ec60bd889c71a6d80eca7041a376aa5ca8a535cc
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 5 15:23:44 2015 -0500
flowbox: Add element names
The names used here are flowbox and flowboxchild.
gtk/gtkflowbox.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 84fae7d..6b553df 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -51,6 +51,11 @@
* Also see #GtkListBox.
*
* GtkFlowBox was added in GTK+ 3.12.
+ *
+ * # CSS nodes
+ *
+ * GtkFlowBox uses a single CSS node with name flowbox. GtkFlowBoxChild
+ * uses a single CSS node with name flowboxchild.
*/
#include <config.h>
@@ -616,18 +621,14 @@ gtk_flow_box_child_class_init (GtkFlowBoxChildClass *class)
widget_class->activate_signal = child_signals[CHILD_ACTIVATE];
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_LIST_ITEM);
+ gtk_widget_class_set_css_name (widget_class, "flowboxchild");
}
static void
gtk_flow_box_child_init (GtkFlowBoxChild *child)
{
- GtkStyleContext *context;
-
gtk_widget_set_can_focus (GTK_WIDGET (child), TRUE);
gtk_widget_set_redraw_on_allocate (GTK_WIDGET (child), TRUE);
-
- context = gtk_widget_get_style_context (GTK_WIDGET (child));
- gtk_style_context_add_class (context, "grid-child");
}
/* Public API {{{2 */
@@ -3991,6 +3992,7 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
"unselect-all", 0);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_FLOW_BOX_ACCESSIBLE);
+ gtk_widget_class_set_css_name (widget_class, "flowbox");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]