diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-06-15 17:41:56 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-06-15 17:41:56 +0000 |
| commit | 31d3fbf7548209bcbf0c2b6ab3fce8d4b8ce7f0c (patch) | |
| tree | 8370518b6873af2554d58ab3f21e2d834437a5c7 | |
| parent | 464583c4d7a27be0ba5cd93e7035feb5b90c0c5b (diff) | |
| download | qmmp-31d3fbf7548209bcbf0c2b6ab3fce8d4b8ce7f0c.tar.gz qmmp-31d3fbf7548209bcbf0c2b6ab3fce8d4b8ce7f0c.tar.bz2 qmmp-31d3fbf7548209bcbf0c2b6ab3fce8d4b8ce7f0c.zip | |
fixed skin parsing
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@972 90c681e8-e032-0410-971d-27865f9a5e38
| -rw-r--r-- | src/ui/skin.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
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; |
