summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-11 09:34:19 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-11 09:34:19 +0200
commitcdab405b9d2e09a3d9cefeba2b04534d5ba5320c (patch)
treef340ea0e8bfb56009172159684145a64b7bdee96 /src/tabbar.cpp
parentMerge commit 'refs/merge-requests/1743' of git://gitorious.org/rekonq/mainlin... (diff)
parentoption for "Always show tab previews" (diff)
downloadrekonq-cdab405b9d2e09a3d9cefeba2b04534d5ba5320c.tar.xz
Merge commit 'refs/merge-requests/1745' of git://gitorious.org/rekonq/mainline into SundayIll2
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp57
1 files changed, 32 insertions, 25 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 815a153d..569a59c5 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -32,6 +32,7 @@
#include "tabbar.moc"
// Local Includes
+#include "rekonq.h"
#include "application.h"
#include "mainwindow.h"
#include "urlbar.h"
@@ -265,47 +266,53 @@ void TabBar::showTabPreview(int tab)
void TabBar::mouseMoveEvent(QMouseEvent *event)
{
- //Find the tab under the mouse
- int i = 0;
- int tab = -1;
- while (i<count() && tab==-1)
+ if (ReKonfig::alwaysShowTabPreviews())
{
- if (tabRect(i).contains(event->pos()))
+ //Find the tab under the mouse
+ int i = 0;
+ int tab = -1;
+ while (i<count() && tab==-1)
{
- tab = i;
+ if (tabRect(i).contains(event->pos()))
+ {
+ tab = i;
+ }
+ i++;
}
- i++;
- }
- //if found and not the current tab then show tab preview
- if (tab != -1 && tab != currentIndex() && m_currentTabPreview != tab)
- {
- showTabPreview(tab);
- m_currentTabPreview = tab;
- }
+ //if found and not the current tab then show tab preview
+ if (tab != -1 && tab != currentIndex() && m_currentTabPreview != tab)
+ {
+ showTabPreview(tab);
+ m_currentTabPreview = tab;
+ }
- //if current tab or not found then hide previous tab preview
- if (tab==currentIndex() || tab==-1)
- {
- if ( m_previewPopup)
+ //if current tab or not found then hide previous tab preview
+ if (tab==currentIndex() || tab==-1)
{
- m_previewPopup->hide();
+ if ( m_previewPopup)
+ {
+ m_previewPopup->hide();
+ }
+ m_currentTabPreview = -1;
}
- m_currentTabPreview = -1;
}
-
+
KTabBar::mouseMoveEvent(event);
}
void TabBar::leaveEvent(QEvent *event)
{
- //if leave tabwidget then hide previous tab preview
- if ( m_previewPopup)
+ if (ReKonfig::alwaysShowTabPreviews())
{
- m_previewPopup->hide();
+ //if leave tabwidget then hide previous tab preview
+ if ( m_previewPopup)
+ {
+ m_previewPopup->hide();
+ }
+ m_currentTabPreview = -1;
}
- m_currentTabPreview = -1;
KTabBar::leaveEvent(event);
}