forked from AuroraMiddleware/gtk
Add a label style class
This commit is contained in:
parent
f2cd7f151e
commit
75bcecb363
@ -5998,6 +5998,7 @@ GTK_STYLE_CLASS_IMAGE
|
||||
GTK_STYLE_CLASS_INFO
|
||||
GTK_STYLE_CLASS_INLINE_TOOLBAR
|
||||
GTK_STYLE_CLASS_INSERTION_CURSOR
|
||||
GTK_STYLE_CLASS_LABEL
|
||||
GTK_STYLE_CLASS_LEFT
|
||||
GTK_STYLE_CLASS_LEVEL_BAR
|
||||
GTK_STYLE_CLASS_LINKED
|
||||
|
@ -1298,6 +1298,7 @@ static void
|
||||
gtk_label_init (GtkLabel *label)
|
||||
{
|
||||
GtkLabelPrivate *priv;
|
||||
GtkStyleContext *context;
|
||||
|
||||
label->priv = gtk_label_get_instance_private (label);
|
||||
priv = label->priv;
|
||||
@ -1334,6 +1335,9 @@ 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);
|
||||
|
@ -176,6 +176,17 @@ struct _GtkStyleContextClass
|
||||
*/
|
||||
#define GTK_STYLE_CLASS_ENTRY "entry"
|
||||
|
||||
/**
|
||||
* GTK_STYLE_CLASS_LABEL:
|
||||
*
|
||||
* A CSS class to match labels.
|
||||
*
|
||||
* This is used by #GtkLabel.
|
||||
*
|
||||
* Since: 3.16
|
||||
*/
|
||||
#define GTK_STYLE_CLASS_LABEL "label"
|
||||
|
||||
/**
|
||||
* GTK_STYLE_CLASS_COMBOBOX_ENTRY:
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user