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

List:       kde-commits
Subject:    kdenetwork/kopete/kopete/chatwindow
From:       Engin Aydogan <engin () bzzzt ! biz>
Date:       2005-03-30 9:17:11
Message-ID: 20050330091711.B9FD8484 () office ! kde ! org
[Download RAW message or body]

CVS commit by engin: 


Makes emoticon selector animate GIF images by simply replacing QPixmap by QMovie.


  M +7 -2      emoticonselector.cpp   1.8


--- kdenetwork/kopete/kopete/chatwindow/emoticonselector.cpp  #1.7:1.8
@@ -25,5 +25,5 @@
 #include <math.h>
 
-#include <qpixmap.h>
+#include <qmovie.h>
 #include <qlayout.h>
 #include <qobjectlist.h>
@@ -36,7 +36,12 @@ EmoticonLabel::EmoticonLabel(const QStri
 {
         mText = emoticonText;
-        setPixmap( QPixmap(pixmapPath) );
+        setMovie( QMovie(pixmapPath) );
         setAlignment(Qt::AlignCenter);
         QToolTip::add(this,emoticonText);
+        // Somehow QLabel doesn't tell a reasonable size when you use setMovie
+        // although it does it correctly for setPixmap. Therefore here is a little workaround
+        // to tell our minimum size.
+        QPixmap p(pixmapPath);
+        setMinimumSize(p.size());
 }
 


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

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