[gthumb] slideshow: use a custom svg icon for the pause symbol
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] slideshow: use a custom svg icon for the pause symbol
- Date: Sun, 12 Sep 2010 11:12:01 +0000 (UTC)
commit 7444c8c01e0b9736dfaff87fd9d3e4efd93caaa0
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Sep 11 18:55:21 2010 +0200
slideshow: use a custom svg icon for the pause symbol
.../hicolor/scalable/actions/slideshow-pause.svg | 97 ++++++++++++++++++++
extensions/slideshow/gth-slideshow.c | 23 ++++-
2 files changed, 114 insertions(+), 6 deletions(-)
---
diff --git a/data/icons/hicolor/scalable/actions/slideshow-pause.svg b/data/icons/hicolor/scalable/actions/slideshow-pause.svg
new file mode 100644
index 0000000..f994bd1
--- /dev/null
+++ b/data/icons/hicolor/scalable/actions/slideshow-pause.svg
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="250"
+ height="250"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.47 r22583"
+ sodipodi:docname="slideshow-pause.svg">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#ff959c"
+ borderopacity="1"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7"
+ inkscape:cx="111.26892"
+ inkscape:cy="126.25265"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1280"
+ inkscape:window-height="949"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1"
+ showborder="false"
+ inkscape:showpageshadow="false" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Livello 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-123.23861,-339.69958)">
+ <g
+ id="g4197"
+ transform="translate(5.7142875,14.285701)">
+ <rect
+ ry="10"
+ y="325.41388"
+ x="117.52432"
+ height="250"
+ width="250"
+ id="rect2816"
+ style="opacity:0.5;fill:#000000;fill-opacity:1;stroke:none" />
+ <g
+ id="g4193">
+ <rect
+ style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke:none"
+ id="rect4123"
+ width="34.114952"
+ height="137.4207"
+ x="196.18114"
+ y="381.70352"
+ ry="10" />
+ <rect
+ ry="10"
+ y="381.70352"
+ x="254.75256"
+ height="137.4207"
+ width="34.114952"
+ id="rect4176"
+ style="opacity:0.8;fill:#ffffff;fill-opacity:1;stroke:none" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/extensions/slideshow/gth-slideshow.c b/extensions/slideshow/gth-slideshow.c
index 667b183..36ec959 100644
--- a/extensions/slideshow/gth-slideshow.c
+++ b/extensions/slideshow/gth-slideshow.c
@@ -926,7 +926,7 @@ clutter_projector_paused (GthSlideshow *self)
clutter_actor_get_size (self->stage, &actor_w, &actor_h);
clutter_actor_set_position (self->priv->paused_actor, stage_w / 2.0, stage_h / 2.0);
clutter_actor_set_anchor_point_from_gravity (self->priv->paused_actor, CLUTTER_GRAVITY_CENTER);
- clutter_actor_set_scale (self->priv->paused_actor, 5.0, 5.0);
+ clutter_actor_set_scale (self->priv->paused_actor, 1.0, 1.0);
clutter_actor_set_opacity (self->priv->paused_actor, 255);
clutter_actor_raise_top (self->priv->paused_actor);
clutter_actor_show (self->priv->paused_actor);
@@ -934,8 +934,8 @@ clutter_projector_paused (GthSlideshow *self)
clutter_actor_animate (self->priv->paused_actor,
CLUTTER_LINEAR, 500,
"opacity", 0,
- "scale-x", 15.0,
- "scale-y", 15.0,
+ "scale-x", 3.0,
+ "scale-y", 3.0,
NULL);
}
@@ -1071,6 +1071,7 @@ clutter_projector_construct (GthSlideshow *self)
{
GtkWidget *embed;
ClutterColor background_color = { 0x0, 0x0, 0x0, 0xff };
+ GdkPixbuf *icon_pixbuf;
embed = gtk_clutter_embed_new ();
self->stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (embed));
@@ -1096,9 +1097,19 @@ clutter_projector_construct (GthSlideshow *self)
g_signal_connect (self->priv->timeline, "new-frame", G_CALLBACK (animation_frame_cb), self);
g_signal_connect (self->priv->timeline, "started", G_CALLBACK (animation_started_cb), self);
- self->priv->paused_actor = gtk_clutter_texture_new_from_stock (GTK_WIDGET (self),
- GTK_STOCK_MEDIA_PAUSE,
- GTK_ICON_SIZE_DIALOG);
+ icon_pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+ "slideshow-pause",
+ 100,
+ 0,
+ NULL);
+ if (icon_pixbuf != NULL) {
+ self->priv->paused_actor = gtk_clutter_texture_new_from_pixbuf (icon_pixbuf);
+ g_object_unref (icon_pixbuf);
+ }
+ else
+ self->priv->paused_actor = gtk_clutter_texture_new_from_stock (GTK_WIDGET (self),
+ GTK_STOCK_MEDIA_PAUSE,
+ GTK_ICON_SIZE_DIALOG);
clutter_actor_hide (self->priv->paused_actor);
clutter_container_add_actor (CLUTTER_CONTAINER (self->stage), self->priv->paused_actor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]