[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_4_BRANCH: kdenetwork/kopete/kopete/contactlist
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2005-03-31 8:29:50
Message-ID: 20050331082950.245844A6 () office ! kde ! org
[Download RAW message or body]

CVS commit by ogoffart: 

Backport fix for Bug 101665: Contact photos wider than they are tall don't keep their \
correct aspect


  M +2 -4      kopetemetacontactlvi.cpp   1.114.2.1


--- kdenetwork/kopete/kopete/contactlist/kopetemetacontactlvi.cpp  #1.114:1.114.2.1
@@ -524,14 +524,12 @@ void KopeteMetaContactLVI::slotPhotoChan
                 {
                         int photoSize = d->photoSize;
-                        float ratio = \
                float(photoImg.width())/float(photoImg.height());
-                        int newsize =int(float(photoSize*ratio));
                         
                         if ( photoImg.width() > photoImg.height() )
                         {
-                                photoImg = photoImg.smoothScale( photoSize, newsize \
); +                                photoImg = photoImg.smoothScale( photoSize, \
photoSize * photoImg.height() / photoImg.width() ) ;  }
                         else
                         {
-                                photoImg = photoImg.smoothScale( newsize, photoSize \
); +                                photoImg = photoImg.smoothScale( photoSize *  \
photoImg.width() / photoImg.height() , photoSize );  }
                         


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic