summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorlionelc <lionelc@lionelc.(none)>2009-10-09 17:45:16 +0200
committerlionelc <lionelc@lionelc.(none)>2009-10-09 17:45:16 +0200
commit6673522da6e3900e0a5ee50e4428384e1f6ae069 (patch)
tree9e4423d7b4d4d4dde679b009962cc7480af55403 /src/tabbar.cpp
parentHUGE COMMIT (diff)
downloadrekonq-6673522da6e3900e0a5ee50e4428384e1f6ae069.tar.xz
option for "Always show tab previews"
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);
}