label: Use the element name label
Set the element name on the CSS node, and drop the .label style class.
This commit is contained in:
parent
506d5b5b48
commit
7d98c7f1ae
@ -71,6 +71,10 @@
|
||||
* implies, most labels are used to label another widget such as a
|
||||
* #GtkButton, a #GtkMenuItem, or a #GtkComboBox.
|
||||
*
|
||||
* # CSS nodes
|
||||
*
|
||||
* GtkLabel has a single CSS node with the name label.
|
||||
*
|
||||
* # GtkLabel as GtkBuildable
|
||||
*
|
||||
* The GtkLabel implementation of the GtkBuildable interface supports a
|
||||
@ -1146,6 +1150,8 @@ gtk_label_class_init (GtkLabelClass *class)
|
||||
|
||||
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_LABEL_ACCESSIBLE);
|
||||
|
||||
gtk_widget_class_set_css_name (widget_class, "label");
|
||||
|
||||
quark_shortcuts_connected = g_quark_from_static_string ("gtk-label-shortcuts-connected");
|
||||
quark_mnemonic_menu = g_quark_from_static_string ("gtk-mnemonic-menu");
|
||||
quark_mnemonics_visible_connected = g_quark_from_static_string ("gtk-label-mnemonics-visible-connected");
|
||||
@ -1310,7 +1316,6 @@ static void
|
||||
gtk_label_init (GtkLabel *label)
|
||||
{
|
||||
GtkLabelPrivate *priv;
|
||||
GtkStyleContext *context;
|
||||
|
||||
label->priv = gtk_label_get_instance_private (label);
|
||||
priv = label->priv;
|
||||
@ -1347,9 +1352,6 @@ gtk_label_init (GtkLabel *label)
|
||||
|
||||
gtk_label_set_text (label, "");
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (label));
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LABEL);
|
||||
|
||||
priv->drag_gesture = gtk_gesture_drag_new (GTK_WIDGET (label));
|
||||
g_signal_connect (priv->drag_gesture, "drag-begin",
|
||||
G_CALLBACK (gtk_label_drag_gesture_begin), label);
|
||||
|
Loading…
Reference in New Issue
Block a user