From 0843db1a08e67164ca5af629e146798223a86831 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 3 Sep 2007 20:07:49 +0000 Subject: fixed skin parsing git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@136 90c681e8-e032-0410-971d-27865f9a5e38 --- src/skin.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/skin.cpp b/src/skin.cpp index 7f07c4a5d..12a7ae13f 100644 --- a/src/skin.cpp +++ b/src/skin.cpp @@ -179,8 +179,18 @@ void Skin::loadPosBar() if (!pixmap) pixmap = getDummyPixmap("posbar"); - buttons[BT_POSBAR_N] = pixmap->copy ( 248,0,29, pixmap->height()); - buttons[BT_POSBAR_P] = pixmap->copy ( 278,0,29, pixmap->height()); + if (pixmap->width() > 249) + { + buttons[BT_POSBAR_N] = pixmap->copy ( 248,0,29, pixmap->height()); + buttons[BT_POSBAR_P] = pixmap->copy ( 278,0,29, pixmap->height()); + } + else + { + QPixmap dummy(29, pixmap->height()); + dummy.fill(Qt::transparent); + buttons[BT_POSBAR_N] = dummy; + buttons[BT_POSBAR_P] = dummy; + } posbar = pixmap->copy ( 0,0,248,pixmap->height() ); delete pixmap; -- cgit v1.2.3-13-gbd6f