Commit e51b3015 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Arturo Espinosa
Browse files

Set the item_bar->gc's foreground color to black (it is by default

1998-07-14  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* src/item-bar.c (item_bar_realize): Set the item_bar->gc's
	foreground color to black (it is by default initialized to pixel
	value 0, which is not black on all default colormaps).
	(bar_draw_cell): Center the cell's text correctly.
parent 72216f8b
1998-07-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* src/item-bar.c (item_bar_realize): Set the item_bar->gc's
foreground color to black (it is by default initialized to pixel
value 0, which is not black on all default colormaps).
(bar_draw_cell): Center the cell's text correctly.
* src/gnumeric-sheet.c (gnumeric_sheet_create): Use
gnome_canvas_construct() to initialize the canvas.
......
1998-07-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* src/item-bar.c (item_bar_realize): Set the item_bar->gc's
foreground color to black (it is by default initialized to pixel
value 0, which is not black on all default colormaps).
(bar_draw_cell): Center the cell's text correctly.
* src/gnumeric-sheet.c (gnumeric_sheet_create): Use
gnome_canvas_construct() to initialize the canvas.
......
1998-07-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* src/item-bar.c (item_bar_realize): Set the item_bar->gc's
foreground color to black (it is by default initialized to pixel
value 0, which is not black on all default colormaps).
(bar_draw_cell): Center the cell's text correctly.
* src/gnumeric-sheet.c (gnumeric_sheet_create): Use
gnome_canvas_construct() to initialize the canvas.
......
1998-07-14 Federico Mena Quintero <federico@nuclecu.unam.mx>
* src/item-bar.c (item_bar_realize): Set the item_bar->gc's
foreground color to black (it is by default initialized to pixel
value 0, which is not black on all default colormaps).
(bar_draw_cell): Center the cell's text correctly.
* src/gnumeric-sheet.c (gnumeric_sheet_create): Use
gnome_canvas_construct() to initialize the canvas.
......
......@@ -64,12 +64,15 @@ item_bar_realize (GnomeCanvasItem *item)
ItemBar *item_bar;
GdkWindow *window;
GdkGC *gc;
GdkColor c;
item_bar = ITEM_BAR (item);
window = GTK_WIDGET (item->canvas)->window;
/* Configure our gc */
item_bar->gc = gc = gdk_gc_new (window);
gnome_canvas_get_color (item->canvas, "black", &c);
gdk_gc_set_foreground (item_bar->gc, &c);
item_bar->normal_cursor = gdk_cursor_new (GDK_ARROW);
if (item_bar->orientation == GTK_ORIENTATION_VERTICAL)
......@@ -149,8 +152,9 @@ bar_draw_cell (ItemBar *item_bar, GdkDrawable *drawable, ColRowInfo *info, char
gdk_draw_rectangle (drawable, gc, TRUE, x1 + 1, y1 + 1, x2-x1-2, y2-y1-2);
gtk_draw_shadow (canvas->style, drawable, GTK_STATE_NORMAL, shadow,
x1, y1, x2-x1, y2-y1);
gdk_draw_string (drawable, font, item_bar->gc, x1 + ((x2 - x1)-len)/2,
y2 - (y2 - y1)/2 + texth/2 - 1,
gdk_draw_string (drawable, font, item_bar->gc,
x1 + ((x2 - x1) - len) / 2,
y1 + ((y2 - y1) - texth) / 2 + font->ascent,
str);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment