gcompris r3666 - branches/gcomprixogoo/src/gcompris
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3666 - branches/gcomprixogoo/src/gcompris
- Date: Fri, 2 Jan 2009 22:05:54 +0000 (UTC)
Author: bcoudoin
Date: Fri Jan 2 22:05:54 2009
New Revision: 3666
URL: http://svn.gnome.org/viewvc/gcompris?rev=3666&view=rev
Log:
one more on the single skin road
Modified:
branches/gcomprixogoo/src/gcompris/score.c
Modified: branches/gcomprixogoo/src/gcompris/score.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/score.c (original)
+++ branches/gcomprixogoo/src/gcompris/score.c Fri Jan 2 22:05:54 2009
@@ -89,21 +89,26 @@
case SCORESTYLE_NOTE :
{
gchar *tmp;
- GdkPixbuf *button_pixmap = NULL;
+ GooCanvasItem *item;
+ GooCanvasBounds bounds;
- button_pixmap = gc_skin_pixmap_load("button_large.png");
- goo_canvas_image_new (boardRootItem,
- button_pixmap,
- x,
- y-gdk_pixbuf_get_height(button_pixmap)/2,
+ item =
+ goo_canvas_svg_new (boardRootItem,
+ gc_skin_rsvg_get(),
+ "svg-id", "#BUTTON_TEXT",
+ "autocrop", TRUE,
NULL);
+ goo_canvas_item_get_bounds(item, &bounds);
+
+ SET_ITEM_LOCATION(item,
+ x,
+ y - (bounds.y2 - bounds.y1)/2 );
tmp = g_strdup_printf("%d/%d", value, max);
display_number(boardRootItem,
- x + gdk_pixbuf_get_width(button_pixmap)/2,
- y - gdk_pixbuf_get_height(button_pixmap)/2,
+ x + (bounds.x2 - bounds.x1)/2,
+ y - (bounds.y2 - bounds.y1)/2,
tmp);
- gdk_pixbuf_unref(button_pixmap);
g_free(tmp);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]