[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/context/applets/currenttrack
From: Michaƫl Todorovic <michael.todorovic () free ! fr>
Date: 2008-02-14 16:30:16
Message-ID: 1203006616.510322.27501.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 775003 by mtodorovic:
Now the covers (not square) are centered in currentTrack applet
M +5 -0 CurrentTrack.cpp
--- trunk/extragear/multimedia/amarok/src/context/applets/currenttrack/CurrentTrack.cpp #775002:775003
@@ -334,6 +334,11 @@
cover = cover.scaledToHeight( size, Qt::SmoothTransformation );
else
cover = cover.scaledToWidth( size, Qt::SmoothTransformation );
+
+ //center the cover : if the cover is not squared, we get the missing pixels and center
+ qreal moveBy = qAbs(cover.rect().width()-cover.rect().height())/2.0;
+ m_albumCover->setPos(m_albumCover->x()+ moveBy, m_albumCover->y());
+
m_albumCover->setPixmap( cover );
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic