LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File kdebase-chakra-18-execute_feedback.patch of Package kdebase3 (Project openSUSE:Factory)

diff -Naur kdebase-3.5.8.orig/kicker/libkicker/panelbutton.cpp kdebase-3.5.8/kicker/libkicker/panelbutton.cpp
--- kdebase-3.5.8.orig/kicker/libkicker/panelbutton.cpp	2006-07-22 10:15:18.000000000 +0200
+++ kdebase-3.5.8/kicker/libkicker/panelbutton.cpp	2007-11-21 06:50:46.000000000 +0100
@@ -29,6 +29,7 @@
 #include <qstyle.h>
 #include <qstylesheet.h>
 #include <qtooltip.h>
+#include <qpixmap.h>
 
 #include <kapplication.h>
 #include <kconfig.h>
@@ -39,6 +40,7 @@
 #include <kglobalsettings.h>
 #include <kiconloader.h>
 #include <kicontheme.h>
+#include <kiconeffect.h>
 #include <kipc.h>
 #include <kstandarddirs.h>
 #include <klocale.h>
@@ -487,6 +489,9 @@
     if (e->button() == LeftButton)
     {
         m_isLeftMouseButtonDown = false;
+	
+	QPixmap pix = labelIcon();
+	KIconEffect::visualActivate(this, this->geometry(), &pix);
     }
     QButton::mouseReleaseEvent(e);
 }
diff -Naur kdebase-3.5.8.orig/konqueror/listview/konq_listviewwidget.cc kdebase-3.5.8/konqueror/listview/konq_listviewwidget.cc
--- kdebase-3.5.8.orig/konqueror/listview/konq_listviewwidget.cc	2006-10-01 19:32:03.000000000 +0200
+++ kdebase-3.5.8/konqueror/listview/konq_listviewwidget.cc	2007-11-21 06:50:46.000000000 +0100
@@ -33,6 +33,7 @@
 #include <kurldrag.h>
 #include <kmessagebox.h>
 #include <kiconloader.h>
+#include <kiconeffect.h>
 
 #include <qheader.h>
 #include <qpainter.h>
@@ -904,7 +905,42 @@
    url.cleanPath();
    bool isIntoTrash =  url.isLocalFile() && url.path(1).startsWith(KGlobalSettings::trashPath());
    if ( !isIntoTrash || (isIntoTrash && fileItem->isDir()) )
-      m_pBrowserView->lmbClicked( fileItem );
+   {
+         m_pBrowserView->lmbClicked( fileItem );
+
+	 if (_item->pixmap(0) != 0)
+	 {
+	   // Rect of the QListViewItem's pixmap area.
+           QRect rect = _item->listView()->itemRect(_item);
+
+	   // calculate nesting depth
+	   int nestingDepth = 0;
+	   for (QListViewItem *currentItem = _item->parent();
+	        currentItem != 0;
+	        currentItem = currentItem->parent())
+	  	  nestingDepth++;
+	
+	   // no parent no indent
+	   if (_item->parent() == 0)
+		nestingDepth = 0;
+	
+	   // Root decoration means additional indent
+	   if (_item->listView()->rootIsDecorated())
+		nestingDepth++;
+	
+	   // set recalculated rect	
+	   rect.setLeft(_item->listView()->itemMargin() + _item->listView()->treeStepSize() * nestingDepth);
+	   rect.setWidth(_item->pixmap(0)->width());
+
+	   // gather pixmap
+	   QPixmap *pix = new QPixmap(*(_item->pixmap(0)));
+
+	   // call the icon effect
+           KIconEffect::visualActivate(viewport(), rect, pix);
+	 
+	   delete(pix);
+	 }
+   }
    else
       KMessageBox::information( 0, i18n("You must take the file out of the trash before being able to use it.") );
 }
diff -Naur kdebase-3.5.8.orig/libkonq/konq_iconviewwidget.cc kdebase-3.5.8/libkonq/konq_iconviewwidget.cc
--- kdebase-3.5.8.orig/libkonq/konq_iconviewwidget.cc	2007-05-14 09:55:47.000000000 +0200
+++ kdebase-3.5.8/libkonq/konq_iconviewwidget.cc	2007-11-21 06:50:46.000000000 +0100
@@ -1848,7 +1848,7 @@
     // Adjust for scrolling (David)
     rect.moveBy( -contentsX(), -contentsY() );
 
-    KIconEffect::visualActivate(viewport(), rect);
+    KIconEffect::visualActivate(viewport(), rect, item->pixmap());
 }
 
 void KonqIconViewWidget::backgroundPixmapChange( const QPixmap & )