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

List:       kde-commits
Subject:    kdenetwork/kopete/libkopete
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2005-04-27 8:58:44
Message-ID: 20050427085844.22455630 () office ! kde ! org
[Download RAW message or body]

CVS commit by ogoffart: 

Respect the ratio of the picture in the popup


  M +4 -2      knotification.cpp   1.2


--- kdenetwork/kopete/libkopete/knotification.cpp  #1.1:1.2
@@ -203,11 +203,13 @@ void KNotification::notifyByPassivePopup
                 pil->setPixmap(pix);
                 pil->setScaledContents(true);
-                if(pix.height() > 80 )
+                if(pix.height() > 80 && pix.height() > pix.width() )
                 {
                         pil->setMaximumHeight(80);
+                        pil->setMaximumWidth(80*pix.width()/pix.height());
                 }
-                if(pix.width() > 80 )
+                else if(pix.width() > 80 && pix.height() <= pix.width())
                 {
                         pil->setMaximumWidth(80);
+                        pil->setMaximumHeight(80*pix.height()/pix.width());
                 }
                 vb=new QVBox(hb);


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

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