# HG changeset patch # User Tomasz Mon # Date 1184323956 -7200 # Node ID f58cbfe8df1babb77de9625a5b0cad357988c90c # Parent ad11e9cf86a40e597359b2e417709d63a4126fd3 use create_dblsize_image for doueblesizing diff -r ad11e9cf86a4 -r f58cbfe8df1b src/audacious/ui_skinned_button.c --- a/src/audacious/ui_skinned_button.c Fri Jul 13 12:35:08 2007 +0200 +++ b/src/audacious/ui_skinned_button.c Fri Jul 13 12:52:36 2007 +0200 @@ -298,15 +298,12 @@ gdk_rgb_get_visual()->depth); if (priv->double_size) { - GdkPixbuf *img, *img2x; - GdkColormap *colormap = gdk_colormap_get_system(); - img = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, priv->w, priv->h); - gdk_pixbuf_get_from_drawable(img, obj, colormap, 0, 0, 0, 0, priv->w, priv->h); - img2x = gdk_pixbuf_scale_simple(img, priv->w*2, priv->h*2, GDK_INTERP_NEAREST); - gdk_draw_pixbuf (image, gc, img2x, 0, 0, 0, 0, priv->w*2, priv->h*2, GDK_RGB_DITHER_NONE, 0, 0); + GdkImage *img, *img2x; + img = gdk_drawable_get_image(obj, 0, 0, priv->w, priv->h); + img2x = create_dblsize_image(img); + gdk_draw_image (image, gc, img2x, 0, 0, 0, 0, priv->w*2, priv->h*2); + g_object_unref(img2x); g_object_unref(img); - g_object_unref(img2x); - g_object_unref(colormap); } else gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, priv->w, priv->h); diff -r ad11e9cf86a4 -r f58cbfe8df1b src/audacious/ui_skinned_horizontal_slider.c --- a/src/audacious/ui_skinned_horizontal_slider.c Fri Jul 13 12:35:08 2007 +0200 +++ b/src/audacious/ui_skinned_horizontal_slider.c Fri Jul 13 12:52:36 2007 +0200 @@ -25,6 +25,7 @@ #include "widgets/widgetcore.h" #include "ui_skinned_horizontal_slider.h" #include "main.h" +#include "util.h" #include #include #include @@ -268,15 +269,12 @@ gdk_rgb_get_visual()->depth); if (priv->double_size) { - GdkPixbuf *img, *img2x; - GdkColormap *colormap = gdk_colormap_get_system(); - img = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, priv->width, priv->height); - gdk_pixbuf_get_from_drawable(img, obj, colormap, 0, 0, 0, 0, priv->width, priv->height); - img2x = gdk_pixbuf_scale_simple(img, priv->width*2, priv->height*2, GDK_INTERP_NEAREST); - gdk_draw_pixbuf (image, gc, img2x, 0, 0, 0, 0, priv->width*2, priv->height*2, GDK_RGB_DITHER_NONE, 0, 0); + GdkImage *img, *img2x; + img = gdk_drawable_get_image(obj, 0, 0, priv->width, priv->height); + img2x = create_dblsize_image(img); + gdk_draw_image (image, gc, img2x, 0, 0, 0, 0, priv->width*2, priv->height*2); + g_object_unref(img2x); g_object_unref(img); - g_object_unref(img2x); - g_object_unref(colormap); } else gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, priv->width, priv->height);