changeset 4558:f6dc859e38b6

Use temporary variables for scale factors.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 May 2008 02:09:10 +0300
parents 2eee464379dc
children 64f83a7bfb2a
files src/audacious/ui_skin.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_skin.c	Mon May 19 01:29:46 2008 +0300
+++ b/src/audacious/ui_skin.c	Mon May 19 02:09:10 2008 +0300
@@ -2037,8 +2037,10 @@
     g_return_if_fail(obj != NULL);
 
     if (scale) {
-        GdkPixbuf *image = gdk_pixbuf_scale_simple(obj, width * cfg.scale_factor, height* cfg.scale_factor, GDK_INTERP_NEAREST);
-        gdk_draw_pixbuf(widget->window, NULL, image, 0, 0, 0, 0, width * cfg.scale_factor , height * cfg.scale_factor, GDK_RGB_DITHER_NONE, 0, 0);
+        gint s_width = width * cfg.scale_factor,
+             s_height = height * cfg.scale_factor;
+        GdkPixbuf *image = gdk_pixbuf_scale_simple(obj, s_width, s_height, GDK_INTERP_NEAREST);
+        gdk_draw_pixbuf(widget->window, NULL, image, 0, 0, 0, 0, s_width, s_height, GDK_RGB_DITHER_NONE, 0, 0);
         g_object_unref(image);
     } else {
         gdk_draw_pixbuf(widget->window, NULL, obj, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NONE, 0, 0);