From 31d3fbf7548209bcbf0c2b6ab3fce8d4b8ce7f0c Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 15 Jun 2009 17:41:56 +0000 Subject: fixed skin parsing git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@972 90c681e8-e032-0410-971d-27865f9a5e38 --- src/ui/skin.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ui/skin.cpp b/src/ui/skin.cpp index 535af46d6..a14a71bde 100644 --- a/src/ui/skin.cpp +++ b/src/ui/skin.cpp @@ -210,18 +210,25 @@ void Skin::loadNumbers() pixmap = getDummyPixmap("numbers"); for (uint i = 0; i < 10; i++) - m_numbers << pixmap->copy (i*9, 0, 9, 13); + m_numbers << pixmap->copy (i*9, 0, 9, pixmap->height()); if (pixmap->width() > 107) - m_numbers << pixmap->copy(99, 0, 9,13); + m_numbers << pixmap->copy(99, 0, 9, pixmap->height()); else { // We didn't find "-" symbol. So we have to extract it from "2". // Winamp uses this method too. - QPixmap pix = pixmap->copy(90,0,9,13); - QPixmap minus = pixmap->copy(18,6,9,1); + QPixmap pix; + if(pixmap->width() > 98) + pix = pixmap->copy(90,0,9,pixmap->height()); + else + { + pix = QPixmap(9, pixmap->height()); + pix.fill(Qt::transparent); + } + QPixmap minus = pixmap->copy(18,pixmap->height()/2,9,1); QPainter paint(&pix); - paint.drawPixmap(0,6, minus); + paint.drawPixmap(0,pixmap->height()/2, minus); m_numbers << pix; } delete pixmap; -- cgit v1.2.3-13-gbd6f