From b08d50a8abd0ce4463ec99bb754986f640cf28fa Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 10 Feb 2011 19:13:11 +0100 Subject: 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. --- src/tabbar.cpp | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'src/tabbar.cpp') 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 #include #include #include -#include // Qt Includes #include #include #include #include -#include -#include #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 -- cgit v1.2.1