summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rekonq.kcfg3
-rw-r--r--src/settings_general.ui10
-rw-r--r--src/tabbar.cpp57
3 files changed, 45 insertions, 25 deletions
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 0bffa53d..0a63922f 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -44,6 +44,9 @@
<entry name="openTabsNearCurrent" type="Bool">
<default>false</default>
</entry>
+ <entry name="alwaysShowTabPreviews" type="Bool">
+ <default>true</default>
+ </entry>
</group>
<!-- Fonts Settings -->
diff --git a/src/settings_general.ui b/src/settings_general.ui
index d12d254f..844a0073 100644
--- a/src/settings_general.ui
+++ b/src/settings_general.ui
@@ -139,6 +139,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="kcfg_alwaysShowTabPreviews">
+ <property name="text">
+ <string>Always show tab previews</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
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);
}