diff options
author | Rodney Dawes <dobey@ximian.com> | 2004-01-21 12:18:57 +0800 |
---|---|---|
committer | Rodney Dawes <dobey@src.gnome.org> | 2004-01-21 12:18:57 +0800 |
commit | e418965910e9e5a5a1d776c7aa98410c898f912d (patch) | |
tree | 83747b15ac5cb22b265ecd21d78b5c3d4be0faf4 /widgets | |
parent | e6b238108c1a01003f74cbdff00457a4cbee8ba0 (diff) | |
download | gsoc2013-evolution-e418965910e9e5a5a1d776c7aa98410c898f912d.tar.gz gsoc2013-evolution-e418965910e9e5a5a1d776c7aa98410c898f912d.tar.zst gsoc2013-evolution-e418965910e9e5a5a1d776c7aa98410c898f912d.zip |
Be even more exactly like the GtkButton painting stuff
2004-01-20 Rodney Dawes <dobey@ximian.com>
* e-combo-button.c (paint): Be even more exactly like the GtkButton
painting stuff
Fixes #52988
svn path=/trunk/; revision=24343
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 7 | ||||
-rw-r--r-- | 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 <dobey@ximian.com> + + * e-combo-button.c (paint): Be even more exactly like the GtkButton + painting stuff + + Fixes #52988 + 2004-01-20 JP Rosevear <jpr@ximian.com> * 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", |