diff options
author | Ross Burton <ross@openedhand.com> | 2006-03-09 18:48:38 +0000 |
---|---|---|
committer | Ross Burton <rburton@src.gnome.org> | 2006-03-09 18:48:38 +0000 |
commit | ff8ea494f9374353d654eea5e83f35935c363253 (patch) | |
tree | 3e4d5c6733b37564e65ac994dacbbf39baf29bc2 /gtk/gtktogglebutton.c | |
parent | 0359e15d3c64ce5142bdf446414b5cbfe7a34ac5 (diff) | |
download | gtk+-ff8ea494f9374353d654eea5e83f35935c363253.tar.gz |
Turn off prelighting when gtk-touchscreen-mode is enabled (#135666)
2006-03-09 Ross Burton <ross@openedhand.com>
* gtk/gtkwidget.c:
* gtk/gtkrange.c:
* gtk/gtktogglebutton.c:
Turn off prelighting when gtk-touchscreen-mode is enabled (#135666)
Diffstat (limited to 'gtk/gtktogglebutton.c')
-rw-r--r-- | gtk/gtktogglebutton.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c index a850f3d5b4..5552ec3a63 100644 --- a/gtk/gtktogglebutton.c +++ b/gtk/gtktogglebutton.c @@ -483,9 +483,13 @@ static void gtk_toggle_button_update_state (GtkButton *button) { GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (button); - gboolean depressed; + gboolean depressed, touchscreen; GtkStateType new_state; + g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)), + "gtk-touchscreen-mode", &touchscreen, + NULL); + if (toggle_button->inconsistent) depressed = FALSE; else if (button->in_button && button->button_down) @@ -493,7 +497,7 @@ gtk_toggle_button_update_state (GtkButton *button) else depressed = toggle_button->active; - if (button->in_button && (!button->button_down || toggle_button->draw_indicator)) + if (!touchscreen && button->in_button && (!button->button_down || toggle_button->draw_indicator)) new_state = GTK_STATE_PRELIGHT; else new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL; |