changeset 3891:3b530b2dcf2c

workaround for strait SKIN_SHUFREP
author Tomasz Mon <desowin@gmail.com>
date Fri, 02 Nov 2007 13:13:45 +0100
parents 0c0306a20e60
children c7601cce1860 184136832520
files src/audacious/skin.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/skin.c	Fri Nov 02 12:42:58 2007 +0100
+++ b/src/audacious/skin.c	Fri Nov 02 13:13:45 2007 +0100
@@ -1711,6 +1711,7 @@
     g_return_if_fail(pixmap != NULL);
     g_return_if_fail(pixmap->pixmap != NULL);
 
+    /* FIXME: instead of copying stuff from SKIN_MAIN, we should use transparency or resize widget */
     if (xsrc+width > pixmap->width || ysrc+height > pixmap->height) {
         if (pixmap_id == SKIN_NUMBERS) {
             xsrc = 90;
@@ -1729,6 +1730,11 @@
             /* it's better to hide mainwin_playstatus than display mess */
             if (pixmap->width != 42)
                 gtk_widget_hide(mainwin_playstatus);
+        } else if (pixmap_id == SKIN_SHUFREP) {
+            /* some winamp skins have too strait SKIN_SHUFREP, so let's copy what's remain from SKIN_MAIN */
+            gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
+                              164 + xdest, 89, xdest, ydest, width, height);
+            width = pixmap->width - xsrc;
         } else
             return;
     }