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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/kickoff/ui
From:       Andre Duffeck <andre () duffeck ! de>
Date:       2008-04-02 9:57:46
Message-ID: 1207130266.865963.29411.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 792818 by duffeck:

use isHorizontal()


 M  +3 -16     tabbar.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/tabbar.cpp #792817:792818
@@ -366,25 +366,12 @@
         animationFinished();
         return;
     }
-
-    bool horiz = true;
-
-    switch (shape()) {
-        case RoundedWest:
-        case RoundedEast:
-        case TriangularWest:
-        case TriangularEast:
-            horiz = false;
-            break;
-        default:
-            // we're horizontal
-            break;
-    }
+    
     // animation rect
     QRect rect = tabRect(currentIndex());
     QRect lastRect = tabRect(lastIndex());
-    int x = horiz ? (int)(lastRect.x() - value * (lastRect.x() - rect.x())) : rect.x();
-    int y = horiz ? rect.y() : (int)(lastRect.y() - value * (lastRect.y() - rect.y()));
+    int x = isHorizontal() ? (int)(lastRect.x() - value * (lastRect.x() - rect.x())) : rect.x();
+    int y = isHorizontal() ? rect.y() : (int)(lastRect.y() - value * (lastRect.y() - rect.y()));
     QSizeF sz = lastRect.size() - value * (lastRect.size() - rect.size());
     m_currentAnimRect = QRect(x, y, (int)(sz.width()), (int)(sz.height()));
     update();

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

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