diff src/audacious/ui_skin.c @ 4558:f6dc859e38b6

Use temporary variables for scale factors.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 May 2008 02:09:10 +0300
parents 1fe29814b90c
children
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);