diff options
author | Larry Ewing <lewing@helixcode.com> | 2000-08-16 13:16:23 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2000-08-16 13:16:23 +0800 |
commit | e7a10a24388a2b0713c83305a189640adf2f2c94 (patch) | |
tree | cd49b15fd5769a6446d24eee9b8f3b8f21a25e5a | |
parent | 427cce1f77ed8f3d1018498cdab98b6130d24790 (diff) | |
download | gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.tar gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.tar.gz gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.tar.bz2 gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.tar.lz gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.tar.xz gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.tar.zst gsoc2013-evolution-e7a10a24388a2b0713c83305a189640adf2f2c94.zip |
use style colors for the selected state. This doesn't properly redraw the
2000-08-15 Larry Ewing <lewing@helixcode.com>
* gui/minicard/e-minicard.c (e_minicard_event): use style colors
for the selected state. This doesn't properly redraw the minicard
when there is a style_change event, that is next.
(e_minicard_realize): use style colors.
svn path=/trunk/; revision=4851
-rw-r--r-- | addressbook/ChangeLog | 7 | ||||
-rw-r--r-- | addressbook/gui/minicard/e-minicard.c | 20 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-minicard.c | 20 |
3 files changed, 33 insertions, 14 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 746f2933b3..839ac48ca2 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2000-08-15 Larry Ewing <lewing@helixcode.com> + + * gui/minicard/e-minicard.c (e_minicard_event): use style colors + for the selected state. This doesn't properly redraw the minicard + when there is a style_change event, that is next. + (e_minicard_realize): use style colors. + 2000-08-14 Peter Williams <peterw@helixcode.com> * backend/pas/pas-backend-file.c: Include the proper db1/db.h diff --git a/addressbook/gui/minicard/e-minicard.c b/addressbook/gui/minicard/e-minicard.c index 29bc178811..e9bb85c89d 100644 --- a/addressbook/gui/minicard/e-minicard.c +++ b/addressbook/gui/minicard/e-minicard.c @@ -249,9 +249,11 @@ e_minicard_realize (GnomeCanvasItem *item) { EMinicard *e_minicard; GnomeCanvasGroup *group; + GtkWidget *canvas; e_minicard = E_MINICARD (item); group = GNOME_CANVAS_GROUP( item ); + canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas); if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); @@ -273,7 +275,7 @@ e_minicard_realize (GnomeCanvasItem *item) "y1", (double) 2, "x2", (double) e_minicard->width - 3, "y2", (double) e_minicard->height - 3, - "fill_color", "grey70", + "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL ); e_minicard->header_text = @@ -284,7 +286,7 @@ e_minicard_realize (GnomeCanvasItem *item) "clip", TRUE, "use_ellipsis", TRUE, "font", "lucidasans-bold-10", - "fill_color", "black", + "fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL], "text", "", NULL ); e_canvas_item_move_absolute(e_minicard->header_text, 6, 6); @@ -399,8 +401,10 @@ static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicard *e_minicard; + GtkWidget *canvas; e_minicard = E_MINICARD (item); + canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas); switch( event->type ) { case GDK_FOCUS_CHANGE: @@ -408,13 +412,13 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) GdkEventFocus *focus_event = (GdkEventFocus *) event; if ( focus_event->in ) { gnome_canvas_item_set( e_minicard->rect, - "outline_color", "grey50", + "outline_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL ); gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "darkblue", + "fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED], NULL ); gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "white", + "fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED], NULL ); e_minicard->has_focus = TRUE; } else { @@ -446,10 +450,12 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) "outline_color", NULL, NULL ); gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "grey70", + "fill_color_gdk", + &canvas->style->bg[GTK_STATE_NORMAL], NULL ); gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "black", + "fill_color_gdk", + &canvas->style->fg[GTK_STATE_NORMAL], NULL ); e_minicard->has_focus = FALSE; } diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index 29bc178811..e9bb85c89d 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -249,9 +249,11 @@ e_minicard_realize (GnomeCanvasItem *item) { EMinicard *e_minicard; GnomeCanvasGroup *group; + GtkWidget *canvas; e_minicard = E_MINICARD (item); group = GNOME_CANVAS_GROUP( item ); + canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas); if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item); @@ -273,7 +275,7 @@ e_minicard_realize (GnomeCanvasItem *item) "y1", (double) 2, "x2", (double) e_minicard->width - 3, "y2", (double) e_minicard->height - 3, - "fill_color", "grey70", + "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL ); e_minicard->header_text = @@ -284,7 +286,7 @@ e_minicard_realize (GnomeCanvasItem *item) "clip", TRUE, "use_ellipsis", TRUE, "font", "lucidasans-bold-10", - "fill_color", "black", + "fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL], "text", "", NULL ); e_canvas_item_move_absolute(e_minicard->header_text, 6, 6); @@ -399,8 +401,10 @@ static gboolean e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) { EMinicard *e_minicard; + GtkWidget *canvas; e_minicard = E_MINICARD (item); + canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas); switch( event->type ) { case GDK_FOCUS_CHANGE: @@ -408,13 +412,13 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) GdkEventFocus *focus_event = (GdkEventFocus *) event; if ( focus_event->in ) { gnome_canvas_item_set( e_minicard->rect, - "outline_color", "grey50", + "outline_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL], NULL ); gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "darkblue", + "fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED], NULL ); gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "white", + "fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED], NULL ); e_minicard->has_focus = TRUE; } else { @@ -446,10 +450,12 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event) "outline_color", NULL, NULL ); gnome_canvas_item_set( e_minicard->header_rect, - "fill_color", "grey70", + "fill_color_gdk", + &canvas->style->bg[GTK_STATE_NORMAL], NULL ); gnome_canvas_item_set( e_minicard->header_text, - "fill_color", "black", + "fill_color_gdk", + &canvas->style->fg[GTK_STATE_NORMAL], NULL ); e_minicard->has_focus = FALSE; } |