diff src/audacious/ui_skinned_monostereo.c @ 3077:4b076ad636e6

use GdkPixmaps for doublesizing
author Tomasz Mon <desowin@gmail.com>
date Sat, 14 Jul 2007 12:45:03 +0200
parents da99b90d63d3
children 5dc103115dab
line wrap: on
line diff
--- a/src/audacious/ui_skinned_monostereo.c	Sat Jul 14 00:01:14 2007 +0200
+++ b/src/audacious/ui_skinned_monostereo.c	Sat Jul 14 12:45:03 2007 +0200
@@ -203,21 +203,14 @@
         break;
     }
 
-    GdkPixmap *image;
-    image = gdk_pixmap_new(NULL, monostereo->width*(1+monostereo->double_size),
-                                 monostereo->height*(1+monostereo->double_size),
-                                 gdk_rgb_get_visual()->depth);
+    GdkPixmap *image = NULL;
 
     if (monostereo->double_size) {
-        GdkImage *img, *img2x;
-        img = gdk_drawable_get_image(obj, 0, 0, monostereo->width, monostereo->height);
-        img2x = create_dblsize_image(img);
-        gdk_draw_image (image, gc, img2x, 0, 0, 0, 0, monostereo->width*2, monostereo->height*2);
-        g_object_unref(img2x);
-        g_object_unref(img);
-    } else
+        image = create_dblsize_pixmap(obj);
+    } else {
+        image = gdk_pixmap_new(NULL, monostereo->width, monostereo->height, gdk_rgb_get_visual()->depth);
         gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, monostereo->width, monostereo->height);
-
+    }
 
     g_object_unref(obj);