summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-02-16 18:09:34 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-16 18:09:34 +0100
commitdd81e53fff6cfdccfa7459f6631182de4fbd8e3d (patch)
tree204c2e002c95834e12c17359d34b32a4b2a93658 /src/tabbar.cpp
parentCalm down kDebug messages (diff)
downloadrekonq-dd81e53fff6cfdccfa7459f6631182de4fbd8e3d.tar.xz
This patch cleans up tabbar update: show/hide when ReKonfig::alwaysShowTabBar() is off
and update tab button position. It also removes a "feature" introduced to hide/show tab button on tab moving: it has negative effects on tab middle click closing. Reviewed by: NOBODY (oops..)
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 6b12a794..be20ecd3 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -70,12 +70,12 @@ static inline QByteArray highlightPropertyName(int index)
TabBar::TabBar(QWidget *parent)
- : KTabBar(parent)
- , m_actualIndex(-1)
- , m_currentTabPreviewIndex(-1)
- , m_isFirstTimeOnTab(true)
- , m_tabHighlightEffect(new TabHighlightEffect(this))
- , m_animationMapper(new QSignalMapper(this))
+ : KTabBar(parent)
+ , m_actualIndex(-1)
+ , m_currentTabPreviewIndex(-1)
+ , m_isFirstTimeOnTab(true)
+ , m_tabHighlightEffect(new TabHighlightEffect(this))
+ , m_animationMapper(new QSignalMapper(this))
{
setElideMode(Qt::ElideRight);
@@ -230,13 +230,6 @@ void TabBar::mouseMoveEvent(QMouseEvent *event)
return;
}
- if (event->buttons() & Qt::LeftButton)
- {
- // hide addNewTabButton when moving tabs
- MainView *view = qobject_cast<MainView *>(parent());
- QTimer::singleShot(200, view->addTabButton(), SLOT(hide()));
- }
-
KTabBar::mouseMoveEvent(event);
if (ReKonfig::hoveringTabOption() == 0)
@@ -357,15 +350,6 @@ void TabBar::emptyAreaContextMenu(const QPoint &pos)
}
-void TabBar::mouseReleaseEvent(QMouseEvent *event)
-{
- MainView *mv = qobject_cast<MainView *>(parent());
- QTimer::singleShot(200, mv->addTabButton(), SLOT(show()));
-
- KTabBar::mouseReleaseEvent(event);
-}
-
-
void TabBar::tabRemoved(int index)
{
if (ReKonfig::hoveringTabOption() == 0)
@@ -462,4 +446,3 @@ void TabBar::removeAnimation(int index)
m_animationMapper->removeMappings(anim);
delete anim;
}
-