diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp
--- a/src/ViewContainer.cpp
+++ b/src/ViewContainer.cpp
@@ -70,7 +70,7 @@
setMovable(true);
connect(tabBarWidget, &DetachableTabBar::moveTabToWindow, this, &TabbedViewContainer::moveTabToWindow);
tabBar()->setContextMenuPolicy(Qt::CustomContextMenu);
- _newTabButton->setIcon(QIcon::fromTheme(QStringLiteral("document-new")));
+ _newTabButton->setIcon(QIcon::fromTheme(QStringLiteral("tab-new")));
_newTabButton->setAutoRaise(true);
connect(_newTabButton, &QToolButton::clicked, this, [this]{
emit newViewRequest(this);
@@ -103,6 +103,8 @@
}
});
+ connect(tabBar(), &QTabBar::tabCloseRequested, this, &TabbedViewContainer::closeTerminalTab);
+
#if defined(ENABLE_DETACHING)
auto detachAction = _contextPopupMenu->addAction(
QIcon::fromTheme(QStringLiteral("tab-detach")),
@@ -188,15 +190,16 @@
setTabPosition((QTabWidget::TabPosition) KonsoleSettings::tabBarPosition());
- setCornerWidget( KonsoleSettings::showQuickButtons() ? _newTabButton : nullptr, Qt::TopLeftCorner);
- setCornerWidget( KonsoleSettings::showQuickButtons() ? _closeTabButton : nullptr, Qt::TopRightCorner);
+ setCornerWidget(KonsoleSettings::newTabButton() ? _newTabButton : nullptr, Qt::TopLeftCorner);
+ _newTabButton->setVisible(KonsoleSettings::newTabButton());
+
+ setCornerWidget(KonsoleSettings::closeTabButton() == 1 ? _closeTabButton : nullptr, Qt::TopRightCorner);
+ _closeTabButton->setVisible(KonsoleSettings::closeTabButton() == 1);
+
+ tabBar()->setTabsClosable(KonsoleSettings::closeTabButton() == 0);
tabBar()->setExpanding(KonsoleSettings::expandTabWidth());
tabBar()->update();
- if (isVisible() && KonsoleSettings::showQuickButtons()) {
- _newTabButton->setVisible(true);
- _closeTabButton->setVisible(true);
- }
if (KonsoleSettings::tabBarUseUserStyleSheet()) {
setCssFromFile(KonsoleSettings::tabBarUserStyleSheetFile());
diff --git a/src/settings/TabBarSettings.ui b/src/settings/TabBarSettings.ui
--- a/src/settings/TabBarSettings.ui
+++ b/src/settings/TabBarSettings.ui
@@ -62,60 +62,95 @@
- -
-
-
- Expand Individual Tab Widths to Full Window
-
-
-
- -
-
+
-
+
- 2
+ 1
0
-
- text/css
-
+
-
+
+ Above Terminal Area
+
+
+ -
+
+ Below Terminal Area
+
+
- -
-
+
-
+
- Show 'New Tab' and 'Close Tab' buttons
+ Close Tab button:
-
-
- -
-
-
- Use user-defined stylesheet
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
- -
-
+
-
+
1
0
-
- Above Terminal Area
+ On each tab
-
- Below Terminal Area
+ On the tab bar
+
+
+ -
+
+ None
+ -
+
+
+ Show 'New Tab' button
+
+
+
+ -
+
+
+ Expand Individual Tab Widths to Full Window
+
+
+
+ -
+
+
+
+ 2
+ 0
+
+
+
+ text/css
+
+
+
+ -
+
+
+ Use user-defined stylesheet
+
+
+
diff --git a/src/settings/konsole.kcfg b/src/settings/konsole.kcfg
--- a/src/settings/konsole.kcfg
+++ b/src/settings/konsole.kcfg
@@ -91,10 +91,19 @@
-
-
+
+
false
+
+
+
+
+
+
+
+ OnEachTab
+