diff --git a/app/config/windowsettings.ui b/app/config/windowsettings.ui
--- a/app/config/windowsettings.ui
+++ b/app/config/windowsettings.ui
@@ -6,7 +6,7 @@
0
0
- 289
+ 362
441
@@ -14,7 +14,16 @@
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -65,6 +74,35 @@
+ -
+
+
+ false
+
+
+ Close tabs with middle mouse button
+
+
+ Middle-click to close tabs
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QSizePolicy::Fixed
+
+
+
+ 20
+ 20
+
+
+
+
@@ -396,5 +434,21 @@
+
+ kcfg_ShowTabBar
+ toggled(bool)
+ kcfg_MiddleClickCloseTab
+ setEnabled(bool)
+
+
+ 180
+ 44
+
+
+ 193
+ 100
+
+
+
diff --git a/app/config/yakuake.kcfg b/app/config/yakuake.kcfg
--- a/app/config/yakuake.kcfg
+++ b/app/config/yakuake.kcfg
@@ -66,6 +66,11 @@
Whether to update tab titles along with the title bar.
false
+
+
+ Close tabs with middle mouse button
+ true
+
diff --git a/app/tabbar.cpp b/app/tabbar.cpp
--- a/app/tabbar.cpp
+++ b/app/tabbar.cpp
@@ -571,6 +571,8 @@
if (index == -1) return;
+ if (event->button() == Qt::MidButton && !Settings::middleClickCloseTab()) return;
+
if (event->button() == Qt::LeftButton || event->button() == Qt::MidButton)
{
m_startPos = event->pos();