summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-02-10 19:13:11 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-10 19:13:36 +0100
commitb08d50a8abd0ce4463ec99bb754986f640cf28fa (patch)
treef51c6f4a7725fc37b23b9ee2bcdbf6781f7896be /src/tabbar.cpp
parenthighlights inactive tabs if title changes (diff)
downloadrekonq-b08d50a8abd0ce4463ec99bb754986f640cf28fa.tar.xz
Revert "highlights inactive tabs if title changes"
It seems that while me and pierre (with our lazy eyes) found this good, Benjamin found some glitches to fix :) Waiting for a better patch... This reverts commit fc669e0bf82018baa70a8b59529e1a571d5ad820.
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp45
1 files changed, 1 insertions, 44 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 655b93c0..7a8419a3 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -41,22 +41,18 @@
#include "webpage.h"
#include "webtab.h"
#include "websnap.h"
-#include "tabhighlighteffect.h"
// KDE Includes
#include <KActionMenu>
#include <KMenu>
#include <KPassivePopup>
#include <KToolBar>
-#include <KColorScheme>
// Qt Includes
#include <QtGui/QLabel>
#include <QtGui/QLayout>
#include <QtGui/QMouseEvent>
#include <QtGui/QToolButton>
-#include <QPropertyAnimation>
-#include <QStyleOptionFrameV3>
#define BASE_WIDTH_DIVISOR 4
@@ -68,7 +64,6 @@ TabBar::TabBar(QWidget *parent)
, m_actualIndex(-1)
, m_currentTabPreviewIndex(-1)
, m_isFirstTimeOnTab(true)
- , m_tabHighlightEffect(new TabHighlightEffect(this))
{
setElideMode(Qt::ElideRight);
@@ -80,8 +75,6 @@ TabBar::TabBar(QWidget *parent)
connect(this, SIGNAL(contextMenu(int, const QPoint &)), this, SLOT(contextMenu(int, const QPoint &)));
connect(this, SIGNAL(emptyAreaContextMenu(const QPoint &)), this, SLOT(emptyAreaContextMenu(const QPoint &)));
-
- setGraphicsEffect(m_tabHighlightEffect);
}
@@ -358,7 +351,7 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event)
}
-void TabBar::tabRemoved(int index)
+void TabBar::tabRemoved(int /*index*/)
{
if (ReKonfig::hoveringTabOption() == 0)
{
@@ -368,9 +361,6 @@ void TabBar::tabRemoved(int index)
}
m_currentTabPreviewIndex = -1;
}
-
- QString propertyName = QString("hAnim").append(QString::number(index));
- setProperty(propertyName.toAscii(), QVariant()); //destroy property
}
@@ -404,36 +394,3 @@ void TabBar::setupHistoryActions()
am->addAction(a);
}
}
-
-
-QRect TabBar::tabTextRect(int index)
-{
- QStyleOptionTabV3 option;
- initStyleOption(&option, index);
- return style()->subElementRect(QStyle::SE_TabBarTabText, &option, this);
-}
-
-
-void TabBar::setTabHighlighted(int index, bool highlighted)
-{
- QString propertyName = QString("hAnim").append(QString::number(index));
- if (highlighted)
- {
- m_tabHighlightEffect->setProperty(propertyName.toAscii(), qreal(0.9));
- QPropertyAnimation *highlightAnimation = new QPropertyAnimation(m_tabHighlightEffect, propertyName.toAscii());
-
- //setup the animation
- highlightAnimation->setStartValue(0.9);
- highlightAnimation->setEndValue(0.0);
- highlightAnimation->setDuration(500);
- highlightAnimation->setLoopCount(2);
- highlightAnimation->start(QAbstractAnimation::DeleteWhenStopped);
-
- setTabTextColor(index, KColorScheme(QPalette::Active, KColorScheme::Window).foreground(KColorScheme::PositiveText).color());
- }
- else
- {
- m_tabHighlightEffect->setProperty(propertyName.toAscii(), QVariant()); //destroy the property
- setTabTextColor(index, QApplication::palette().text().color());
- }
-} \ No newline at end of file