[gtk+] togglebutton: always set PRELIGHT state when in_button = TRUE
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] togglebutton: always set PRELIGHT state when in_button = TRUE
- Date: Fri, 14 Sep 2012 17:39:54 +0000 (UTC)
commit 52ea721551bee16093a65b3b22421d08601eb208
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Sep 14 13:03:07 2012 -0400
togglebutton: always set PRELIGHT state when in_button = TRUE
Previously, we would avoid setting the prelight state flag when
button_down was TRUE and draw_indicator = FALSE, which is the normal
case of a GtkToggleButton during a mouse press.
It looks like this behavior was introduced a long time ago with commit
b94e6c0a8036a0489ac8ca71de75ba7611218e50. I believe the reason was that
a widget in GTK2 couldn't have more than a single state (e.g.
hover+active) at a given moment.
https://bugzilla.gnome.org/show_bug.cgi?id=684038
gtk/gtktogglebutton.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index cb011fc..999710c 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -644,7 +644,7 @@ gtk_toggle_button_update_state (GtkButton *button)
else
depressed = priv->active;
- if (button->priv->in_button && (!button->priv->button_down || priv->draw_indicator))
+ if (button->priv->in_button)
new_state |= GTK_STATE_FLAG_PRELIGHT;
if (depressed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]