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

List:       kde-core-devel
Subject:    [PATCH] Animated icons with Icon Size/Default Size
From:       Stephan Binner <Stephan.Binner () gmx ! de>
Date:       2002-03-09 17:43:30
[Download RAW message or body]

Hello,

attached patch makes animated icons work if Icon Size/Default Size is
enabled (which is the default settings for new users). OK to commit?

Bye,
   Steve (tries to calm Tackat)
["animated_icons.diff" (text/x-diff)]

Index: konq_iconviewwidget.cc
===================================================================
RCS file: /home/kde/kdebase/libkonq/konq_iconviewwidget.cc,v
retrieving revision 1.195
diff -u -3 -p -r1.195 konq_iconviewwidget.cc
--- konq_iconviewwidget.cc	2002/03/07 16:43:11	1.195
+++ konq_iconviewwidget.cc	2002/03/09 17:38:29
@@ -551,8 +551,9 @@ void KonqIconViewWidget::slotMovieUpdate
         const QPixmap &frame = d->m_movie->framePixmap();
         // This can happen if the icon was scaled to the desired size, so KIconLoader
         // will happily return a movie with different dimensions than the icon
-        if ( frame.width() != d->pActiveItem->iconSize() ||
-             frame.height() != d->pActiveItem->iconSize() ) {
+        int iconSize=d->pActiveItem->iconSize();
+        if (!iconSize) iconSize = KGlobal::iconLoader()->currentSize( KIcon::Desktop );
+        if ( frame.width() != iconSize || frame.height() != iconSize ) {
             d->pActiveItem->setAnimated( false );
             d->m_movie->pause();
             // No movie available, remember it


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

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