aboutsummaryrefslogtreecommitdiffstats
path: root/src/sato-draw-cairo.c
diff options
context:
space:
mode:
authorThomas Wood <thomas@openedhand.com>2008-02-08 12:51:12 +0000
committerThomas Wood <thomas@openedhand.com>2008-02-08 12:51:12 +0000
commitdb264533fb96d9fe998e6ac118912dd9bccbe17c (patch)
treedb640aeabdec2087f5a8daf1ea9593d747846b1d /src/sato-draw-cairo.c
parent8d8222eecf857d924111dc85d0d4d5fbc8942956 (diff)
downloadgtk-sato-engine-db264533fb96d9fe998e6ac118912dd9bccbe17c.tar.gz
gtk-sato-engine-db264533fb96d9fe998e6ac118912dd9bccbe17c.tar.bz2
gtk-sato-engine-db264533fb96d9fe998e6ac118912dd9bccbe17c.zip
* Fix prelight removal hack
Diffstat (limited to 'src/sato-draw-cairo.c')
-rw-r--r--src/sato-draw-cairo.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sato-draw-cairo.c b/src/sato-draw-cairo.c
index d66c31f..0d623a3 100644
--- a/src/sato-draw-cairo.c
+++ b/src/sato-draw-cairo.c
@@ -75,22 +75,22 @@ sato_draw_box (DRAW_ARGS)
/* hack to remove PRELIGHT state */
if (!DETAIL ("menuitem") && state_type == GTK_STATE_PRELIGHT)
{
- if (GTK_IS_BUTTON (widget) && (gtk_button_get_relief (GTK_BUTTON (widget)) == GTK_RELIEF_NONE))
+ if (widget && GTK_IS_TOGGLE_BUTTON (widget) && shadow_type == GTK_SHADOW_IN)
{
- if (GTK_IS_TOGGLE_BUTTON (widget)
- && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
- {
- state_type = GTK_STATE_ACTIVE;
- }
- else
- {
- /* none relief buttons shouldn't draw anything for "normal" state */
- return;
- }
+ state_type = GTK_STATE_ACTIVE;
}
else
{
- state_type = GTK_STATE_NORMAL;
+ if (widget && GTK_IS_BUTTON (widget)
+ && (gtk_button_get_relief (GTK_BUTTON (widget)) == GTK_RELIEF_NONE))
+ {
+ /* none relief buttons shouldn't draw anything for "normal" state */
+ return;
+ }
+ else
+ {
+ state_type == GTK_STATE_NORMAL;
+ }
}
}