[gtk+/gtk-style-context: 196/540] GtkButton: Notify on active state when (un)depressed
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 196/540] GtkButton: Notify on active state when (un)depressed
- Date: Fri, 3 Dec 2010 02:52:36 +0000 (UTC)
commit b9616e81ecc857332a7a71663005330d6dfdd3b6
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Aug 19 22:47:44 2010 +0200
GtkButton: Notify on active state when (un)depressed
gtk/gtkbutton.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 71fb865..beece34 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -2246,6 +2246,18 @@ _gtk_button_set_depressed (GtkButton *button,
if (depressed != priv->depressed)
{
+ if (gtk_widget_get_realized (widget) &&
+ gtk_widget_is_drawable (widget))
+ {
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (widget);
+ gtk_style_context_notify_state_change (context,
+ gtk_widget_get_window (widget),
+ NULL, GTK_STATE_ACTIVE,
+ depressed);
+ }
+
priv->depressed = depressed;
gtk_widget_queue_resize (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]