comparison src/audacious/widgets/skin.c @ 3095:5a7dea5211f3

branch merge
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Tue, 17 Jul 2007 18:33:49 +0900
parents 7f1f6688c32c
children 3b6d316f8b09
comparison
equal deleted inserted replaced
3094:7fbe8ada95ca 3095:5a7dea5211f3
4 * Based on XMMS: 4 * Based on XMMS:
5 * Copyright (C) 1998-2003 XMMS development team. 5 * Copyright (C) 1998-2003 XMMS development team.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or 9 * the Free Software Foundation; under version 2 of the License.
10 * (at your option) any later version.
11 * 10 *
12 * This program is distributed in the hope that it will be useful, 11 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 14 * GNU General Public License for more details.
1619 g_return_if_fail(pixmap->pixmap != NULL); 1618 g_return_if_fail(pixmap->pixmap != NULL);
1620 1619
1621 if (xsrc+width > pixmap->width || ysrc+height > pixmap->height) { 1620 if (xsrc+width > pixmap->width || ysrc+height > pixmap->height) {
1622 if (pixmap_id == SKIN_NUMBERS) 1621 if (pixmap_id == SKIN_NUMBERS)
1623 xsrc = 90; 1622 xsrc = 90;
1624 else 1623 else if (pixmap_id == SKIN_VOLUME) {
1624 /* some winamp skins have too strait SKIN_VOLUME, so let's copy what's remain from SKIN_MAIN */
1625 gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
1626 skin->properties.mainwin_volume_x, skin->properties.mainwin_volume_y,
1627 pixmap->width, ydest, width - pixmap->width, height);
1628 width = pixmap->width;
1629 } else if (pixmap_id == SKIN_MONOSTEREO) {
1630 /* XMMS skins seems to have SKIN_MONOSTEREO with size 58x20 instead of 58x24 */
1631 gdk_draw_drawable(drawable, gc, skin_get_pixmap(bmp_active_skin, SKIN_MAIN)->pixmap,
1632 212 + xdest, 41, xdest, ydest, width, height);
1633 height = pixmap->height/2;
1634 } else
1625 return; 1635 return;
1626 } 1636 }
1627 1637
1628 width = MIN(width, pixmap->width - xsrc); 1638 width = MIN(width, pixmap->width - xsrc);
1629 height = MIN(height, pixmap->height - ysrc); 1639 height = MIN(height, pixmap->height - ysrc);