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

List:       kde-commits
Subject:    KDE/kdebase/workspace/libs/plasma/widgets
From:       Marco Martin <notmart () gmail ! com>
Date:       2008-08-17 15:34:46
Message-ID: 1218987286.517853.30920.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 848389 by mart:

revert a bit of stuff that wasn't supposed to be committed in the first
place


 M  +0 -35     tabbar.cpp  
 M  +0 -5      tabbar.h  


--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/tabbar.cpp #848388:848389
@@ -29,8 +29,6 @@
 #include <KDebug>
 
 #include <plasma/animator.h>
-#include <plasma/panelsvg.h>
-#include <plasma/theme.h>
 
 #include "private/nativetabbar_p.h"
 
@@ -55,13 +53,11 @@
     {
     }
 
-    void syncBorders();
     void slidingCompleted(QGraphicsItem *item);
     void shapeChanged(const QTabBar::Shape shape);
 
     TabBar *q;
     NativeTabBar *tabBar;
-    PanelSvg *background;
     QList<QGraphicsWidget *> pages;
     QGraphicsLinearLayout *mainLayout;
     QGraphicsLinearLayout *tabBarLayout;
@@ -73,16 +69,7 @@
     int newPageAnimId;
 };
 
-void TabBarPrivate::syncBorders()
-{
-    //set margins from the normal element
-    qreal left, top, right, bottom;
 
-    background->getMargins(left, top, right, bottom);
-
-    q->setContentsMargins(left, top, right, bottom);
-}
-
 void TabBarPrivate::slidingCompleted(QGraphicsItem *item)
 {
     if (item == oldPage || item == newPage) {
@@ -145,13 +132,6 @@
     d->tabBarLayout->addItem(tabProxy);
     d->tabBarLayout->addStretch();
 
-    //background painting stuff
-    d->background = new Plasma::PanelSvg(this);
-    d->background->setImagePath("widgets/frame");
-    d->background->setElementPrefix("sunken");
-
-    connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), \
                SLOT(syncBorders()));
-    
     connect(d->tabBar, SIGNAL(currentChanged(int)), this, \
                SLOT(setCurrentIndex(int)));
     connect(d->tabBar, SIGNAL(shapeChanged(QTabBar::Shape)), this, \
                SLOT(shapeChanged(QTabBar::Shape)));
     connect(Plasma::Animator::self(), SIGNAL(movementFinished(QGraphicsItem*)), \
this, SLOT(slidingCompleted(QGraphicsItem*))); @@ -336,21 +316,6 @@
     return d->tabBar;
 }
 
-void TabBar::paint(QPainter *painter,
-                   const QStyleOptionGraphicsItem *option,
-                   QWidget *widget)
-{
-    Q_UNUSED(option)
-    Q_UNUSED(widget)
-
-    d->background->paintPanel(painter, QPoint(contentsRect().left(), \
                contentsRect().top() + nativeWidget()->height()/1.5));
-}
-
-void TabBar::resizeEvent(QGraphicsSceneResizeEvent *event)
-{
-    d->background->resizePanel(event->newSize() - QSize(0, \
                nativeWidget()->height()/2));
-}
-
 void TabBar::wheelEvent(QGraphicsSceneWheelEvent * event)
 {
     //FIXME: probably this would make more sense in NativeTabBar, but it works only \
                here
--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/tabbar.h #848388:848389
@@ -187,16 +187,11 @@
     void currentChanged(int index);
 
 protected:
-    void paint(QPainter *painter,
-               const QStyleOptionGraphicsItem *option,
-               QWidget *widget);
-    void resizeEvent(QGraphicsSceneResizeEvent *event);
     void wheelEvent(QGraphicsSceneWheelEvent *event);
     
 private:
     TabBarPrivate * const d;
 
-    Q_PRIVATE_SLOT(d, void syncBorders())
     Q_PRIVATE_SLOT(d, void slidingCompleted(QGraphicsItem *item))
     Q_PRIVATE_SLOT(d, void shapeChanged(const QTabBar::Shape shape))
 };


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

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