diff options
-rw-r--r-- | gtk/engine/sugar-info.c | 4 | ||||
-rw-r--r-- | gtk/engine/sugar-style.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gtk/engine/sugar-info.c b/gtk/engine/sugar-info.c index 954a930..b4313a7 100644 --- a/gtk/engine/sugar-info.c +++ b/gtk/engine/sugar-info.c @@ -234,7 +234,9 @@ sugar_fill_generic_info (SugarInfo *info, } /* Ignore the prelight state in some cases. */ - if (info->state == GTK_STATE_PRELIGHT) { + if (info->state == GTK_STATE_PRELIGHT && + gdk_color_equal(&style->bg[GTK_STATE_PRELIGHT], + &style->bg[GTK_STATE_NORMAL])) { if (DETAIL ("button") || DETAIL ("buttondefault") || DETAIL ("spinbutton_down") || DETAIL ("spinbutton_up")) { diff --git a/gtk/engine/sugar-style.c b/gtk/engine/sugar-style.c index e048fc1..00bfb5e 100644 --- a/gtk/engine/sugar-style.c +++ b/gtk/engine/sugar-style.c @@ -788,7 +788,9 @@ sugar_style_draw_layout(GtkStyle *style, else /* It appears, that this is not a label inside a button. */ btn = NULL; } - if (state_type != GTK_STATE_INSENSITIVE && btn) { + if (state_type != GTK_STATE_INSENSITIVE && btn && + gdk_color_equal(&btn->style->bg[GTK_STATE_PRELIGHT], + &btn->style->bg[GTK_STATE_NORMAL])) { /* Access private information ... */ sugar_state = GTK_BUTTON (btn)->depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL; } |