From e418965910e9e5a5a1d776c7aa98410c898f912d Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Wed, 21 Jan 2004 04:18:57 +0000 Subject: Be even more exactly like the GtkButton painting stuff 2004-01-20 Rodney Dawes * e-combo-button.c (paint): Be even more exactly like the GtkButton painting stuff Fixes #52988 svn path=/trunk/; revision=24343 --- widgets/misc/ChangeLog | 7 +++++++ widgets/misc/e-combo-button.c | 14 +++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index bb8c5a13c5..8db55ee74c 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,10 @@ +2004-01-20 Rodney Dawes + + * e-combo-button.c (paint): Be even more exactly like the GtkButton + painting stuff + + Fixes #52988 + 2004-01-20 JP Rosevear * e-source-selector.c (rebuild_model): set a primary selection if diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c index bffa0ea5a7..802a776942 100644 --- a/widgets/misc/e-combo-button.c +++ b/widgets/misc/e-combo-button.c @@ -145,13 +145,7 @@ paint (EComboButton *combo_button, int x, y, width, height; int border_width; - if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE) - shadow_type = GTK_SHADOW_IN; - else if (GTK_BUTTON (widget)->relief == GTK_RELIEF_NONE - && GTK_WIDGET_STATE (widget) != GTK_STATE_PRELIGHT) - shadow_type = GTK_SHADOW_NONE; - else - shadow_type = GTK_SHADOW_OUT; + shadow_type = GTK_BUTTON (widget)->depressed ? GTK_SHADOW_IN : GTK_SHADOW_OUT; border_width = GTK_CONTAINER (widget)->border_width; @@ -184,8 +178,10 @@ paint (EComboButton *combo_button, height -= 2 * (focus_width + focus_pad); } - if (GTK_WIDGET_STATE (widget) != GTK_STATE_ACTIVE - || GTK_BUTTON (widget)->depressed) { + if ((GTK_BUTTON (widget)->relief != GTK_RELIEF_NONE) || + ((GTK_WIDGET_STATE(widget) != GTK_STATE_NORMAL) && + (GTK_WIDGET_STATE(widget) != GTK_STATE_ACTIVE || GTK_BUTTON (widget)->depressed) && + (GTK_WIDGET_STATE(widget) != GTK_STATE_INSENSITIVE))) { gtk_paint_box (widget->style, widget->window, GTK_WIDGET_STATE (widget), shadow_type, area, widget, "button", -- cgit v1.2.3