November 8, 2010 1

A small touch.

While using the Package Manager of Pardus, I have always been annoyed with the animation of package list.

In Package Manager, when user clicked on a package -to get its details-, details comes with sliding-down animation. And then if user clicks the same package, details goes away with sliding up animation.

But, when user clicks a different package while one of them opened before, it closes the first one directly (no animation) and then shows the new one with a sliding down animation. A small touch;

--- trunk/kde/package-manager/manager/src/rowanimator.py	2010/10/20 13:51:19	32615
+++ trunk/kde/package-manager/manager/src/rowanimator.py	2010/11/07 20:29:59	32912
@@ -45,16 +45,27 @@
         self.direction = DOWN
         self.row = None
         self.lastrow = None
-        self.timeLine = QTimeLine(300)
         self.t_view = updater
+        self.initTimeLine()
+        self.hoverLinkFilter = HoverLinkFilter(self)
+        self.t_view.installEventFilter(self.hoverLinkFilter)

+    def initTimeLine(self):
+        self.timeLine = QTimeLine(300)
         QObject.connect(self.timeLine, SIGNAL("frameChanged(int)"), self.updateSize)
         QObject.connect(self.timeLine, SIGNAL("finished()"), self.finished)
+        self.timeLine.setDirection(QTimeLine.Backward)

-        self.hoverLinkFilter = HoverLinkFilter(self)
-        self.t_view.installEventFilter(self.hoverLinkFilter)
+    def animate(self, row, reverseOld = False):
+        if self.row >= 0:
+            if not self.row == row:
+                self.timeLine.setFrameRange(DEFAULT_HEIGHT, self.max_height)
+                self.timeLine.start()
+                QObject.connect(self.timeLine, SIGNAL("finished()"), lambda: self.animate(row, True))
+                if not reverseOld:
+                    return

-    def animate(self, row):
+        self.initTimeLine()
         self.setRow(row)
         self.timeLine.setFrameRange(DEFAULT_HEIGHT, self.max_height)
         self.timeLine.start()

Fixed it :) Here are the results;

The old one;


Old Package List Animation from Gökmen Göksel on Vimeo.

The new one;


New Package List Animation from Gökmen Göksel on Vimeo.

Tags: ,

One Response to “A small touch.”

  1. renoX says:

    Not sure, that it is such a good idea: from the video I find the new way a bit confusing visually: you click at one point and there’s “visual activity” at another point..
    There was less ‘visual activity’ on the old way.

    I wonder why not just let the description open?
    Maybe with a ‘close all description’ button.

Leave a Reply