forked from AuroraMiddleware/gtk
togglebutton: Add a style class
This lets us differentiate toggle buttons from plain buttons with button.toggle, without having to redo all the styling.
This commit is contained in:
parent
a953e37735
commit
b350779a6f
@ -220,9 +220,14 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
|
||||
static void
|
||||
gtk_toggle_button_init (GtkToggleButton *toggle_button)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
|
||||
toggle_button->priv = gtk_toggle_button_get_instance_private (toggle_button);
|
||||
toggle_button->priv->active = FALSE;
|
||||
toggle_button->priv->draw_indicator = FALSE;
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (toggle_button));
|
||||
gtk_style_context_add_class (context, "toggle");
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user