gcompris r3675 - in branches/gcomprixogoo: boards/skins/babytoy boards/skins/gartoon src/gcompris
- From: bcoudoin svn gnome org
- To: svn-commits-list gnome org
- Subject: gcompris r3675 - in branches/gcomprixogoo: boards/skins/babytoy boards/skins/gartoon src/gcompris
- Date: Fri, 16 Jan 2009 00:23:50 +0000 (UTC)
Author: bcoudoin
Date: Fri Jan 16 00:23:50 2009
New Revision: 3675
URL: http://svn.gnome.org/viewvc/gcompris?rev=3675&view=rev
Log:
More skin work
Removed:
branches/gcomprixogoo/boards/skins/babytoy/bad.png
branches/gcomprixogoo/boards/skins/gartoon/bad.png
Modified:
branches/gcomprixogoo/boards/skins/gartoon/skin.svg
branches/gcomprixogoo/src/gcompris/gcompris_confirm.c
Modified: branches/gcomprixogoo/boards/skins/gartoon/skin.svg
==============================================================================
--- branches/gcomprixogoo/boards/skins/gartoon/skin.svg (original)
+++ branches/gcomprixogoo/boards/skins/gartoon/skin.svg Fri Jan 16 00:23:50 2009
@@ -1599,9 +1599,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="4.3634004"
- inkscape:cx="466.89677"
- inkscape:cy="185.53692"
+ inkscape:zoom="0.54542505"
+ inkscape:cx="374.37273"
+ inkscape:cy="547.27354"
inkscape:current-layer="layer1"
id="namedview6255"
inkscape:window-width="1280"
@@ -1613,14 +1613,6 @@
showgrid="false">
<sodipodi:guide
orientation="0,1"
- position="641.08589,978.80657"
- id="guide3659" />
- <sodipodi:guide
- orientation="0,1"
- position="644.32697,915.28137"
- id="guide3661" />
- <sodipodi:guide
- orientation="0,1"
position="178.90769,519.86945"
id="guide3076" />
<sodipodi:guide
Modified: branches/gcomprixogoo/src/gcompris/gcompris_confirm.c
==============================================================================
--- branches/gcomprixogoo/src/gcompris/gcompris_confirm.c (original)
+++ branches/gcomprixogoo/src/gcompris/gcompris_confirm.c Fri Jan 16 00:23:50 2009
@@ -157,9 +157,6 @@
ConfirmCallBack iscb) {
GooCanvasItem *item;
- GdkPixbuf *pixmap = NULL;
- GdkPixbuf *pixmap_cross = NULL;
- GdkPixbuf *pixmap_stick = NULL;
if(rootitem)
return;
@@ -226,16 +223,18 @@
* -------
*/
- pixmap = gc_skin_pixmap_load("button_large.png");
- pixmap_stick = gc_skin_pixmap_load("button_checked.png");
- pixmap_cross = gc_skin_pixmap_load("bad.png");
-
+ GooCanvasBounds bounds;
// CANCEL
- no_button = goo_canvas_image_new (rootitem,
- pixmap,
- (double) button_x ,
- (double) button_y + 2*button_h/3,
- NULL);
+ no_button = goo_canvas_svg_new (rootitem,
+ gc_skin_rsvg_get(),
+ "svg-id", "#BUTTON_TEXT",
+ NULL);
+ goo_canvas_item_get_bounds(no_button, &bounds);
+ gint button_width = bounds.x2 - bounds.x1;
+ button_x += button_width / 2;
+ SET_ITEM_LOCATION_CENTER(no_button,
+ button_x,
+ button_y + 2*button_h/3);
g_signal_connect(no_button, "button_press_event",
(GtkSignalFunc) button_event,
@@ -244,12 +243,13 @@
gc_item_focus_init(no_button, NULL);
// CANCEL CROSS
- no_cross = goo_canvas_image_new (rootitem,
- pixmap_cross,
- button_x + gdk_pixbuf_get_width(pixmap)/2
- - gdk_pixbuf_get_width(pixmap_cross)/2,
- button_y + 2*button_h/3,
- NULL);
+ no_cross = goo_canvas_svg_new (rootitem,
+ gc_skin_rsvg_get(),
+ "svg-id", "#UNCHECKED",
+ NULL);
+ SET_ITEM_LOCATION_CENTER(no_cross,
+ button_x ,
+ button_y + 2*button_h/3);
g_signal_connect(no_cross, "button_press_event",
(GtkSignalFunc) button_event,
@@ -259,8 +259,8 @@
goo_canvas_text_new (rootitem,
no_text,
- (gdouble) button_x + gdk_pixbuf_get_width(pixmap) + button_x_int ,
- (gdouble) button_y + 2*button_h/3 + 20,
+ (gdouble) button_x + button_width/2 + button_x_int ,
+ (gdouble) button_y + 2*button_h/3,
-1,
GTK_ANCHOR_WEST,
"font", gc_skin_font_subtitle,
@@ -268,11 +268,14 @@
NULL);
// OK
- yes_button = goo_canvas_image_new (rootitem,
- pixmap,
- (double) button_x ,
- (double) button_y + button_h/3,
- NULL);
+ yes_button = goo_canvas_svg_new (rootitem,
+ gc_skin_rsvg_get(),
+ "svg-id", "#BUTTON_TEXT",
+ NULL);
+
+ SET_ITEM_LOCATION_CENTER(yes_button,
+ button_x ,
+ button_y + button_h/3);
g_signal_connect(yes_button, "button_press_event",
(GtkSignalFunc) button_event,
@@ -281,12 +284,13 @@
gc_item_focus_init(yes_button, NULL);
// OK stick
- yes_stick = goo_canvas_image_new (rootitem,
- pixmap_stick,
- button_x + gdk_pixbuf_get_width(pixmap)/2
- - gdk_pixbuf_get_width(pixmap_stick)/2,
- button_y + button_h/3,
+ yes_stick = goo_canvas_svg_new (rootitem,
+ gc_skin_rsvg_get(),
+ "svg-id", "#CHECKED",
NULL);
+ SET_ITEM_LOCATION_CENTER(yes_stick,
+ button_x ,
+ button_y + button_h/3);
g_signal_connect(yes_stick, "button_press_event",
@@ -296,8 +300,8 @@
goo_canvas_text_new (rootitem,
yes_text,
- (gdouble) button_x + gdk_pixbuf_get_width(pixmap) + button_x_int ,
- (gdouble) button_y + button_h/3 + 20,
+ (gdouble) button_x + button_width/2 + button_x_int ,
+ (gdouble) button_y + button_h/3,
-1,
GTK_ANCHOR_WEST,
"font", gc_skin_font_subtitle,
@@ -306,10 +310,6 @@
confirm_displayed = TRUE;
- gdk_pixbuf_unref(pixmap);
- gdk_pixbuf_unref(pixmap_stick);
- gdk_pixbuf_unref(pixmap_cross);
-
}
/* Apply the style to the given Text item */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]