diff options
| author | xi ota <[email protected]> | 2026-01-17 19:23:16 +0000 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-01-17 19:23:16 +0000 |
| commit | a31695655194c57c608f938c94684fe8db93696b (patch) | |
| tree | 4246a43e493661bab21e2a176fc36cf5d7c3a8ec /src/settings/interface/folderstabssettingspage.cpp | |
| parent | 137097be34a041d457624939e4d9eea25ed58f14 (diff) | |
Add options to always show tab bar and hide close buttons
This MR adds options to keep tab bar always visible and to remove the close button from tabs.
MR !269 cannot be reopened because the branch it is based on is no longer accessible. Per @meven direction, I am opening this new MR.
Note: Defaults to current defaults.
{width=734 height=597}
{width=762 height=580}
Criticisms of previous MR:
* Options should take effect immediately when users apply new settings, rather than requiring restart.
* Done.
* Concern about potential maintenance burden.
* I've been maintaining some version of this patch for ~4-5 years, available via [aur/dolphin-tabopts](https://aur.archlinux.org/packages/dolphin-tabopts) and Chaotic AUR. During that time, only two major rebases were needed. First was what appeared to be automated linting and reformatting. Second was when the preferences system was reorganized.
Had the patch been integrated in the code base prior to those refactors, the first would have required zero maintainer intervention (assuming automated reformatting). The second would have required minimal effort beyond what was needed for the refactor itself.
Every defect I've noticed during that time were also present in the unpatched package.
* There is no demand or desire for this feature.
* Equivalent settings are available in various apps across operating systems and desktop environments, including several KDE apps, such as akregator, kate, konsole (confirmed in 25.12.1).
* The first merge request in this repo !1 was to implement always showing the tab bar.
* Some users have found, created an account, and commented at the previous MR to ask that it be reconsidered.
* Arch opt-in pkgstats shows non-zero count for aur/dolphin-tabopts since early 2023. Max 15 in early 2025. Current 5.
* Chaotic AUR download metrics is 41 (rolling 30-day count).
* Unproductive "discussion" not worth further comment.
Diffstat (limited to 'src/settings/interface/folderstabssettingspage.cpp')
| -rw-r--r-- | src/settings/interface/folderstabssettingspage.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/settings/interface/folderstabssettingspage.cpp b/src/settings/interface/folderstabssettingspage.cpp index 1dbed5a69..7fa34cd6e 100644 --- a/src/settings/interface/folderstabssettingspage.cpp +++ b/src/settings/interface/folderstabssettingspage.cpp @@ -36,6 +36,8 @@ FoldersTabsSettingsPage::FoldersTabsSettingsPage(QWidget *parent) , m_homeUrlRadioButton(nullptr) , m_homeUrl(nullptr) , m_rememberOpenedTabsRadioButton(nullptr) + , m_alwaysShowTabBar(nullptr) + , m_showCloseButtonOnTabs(nullptr) , m_openNewTabAfterLastTab(nullptr) , m_openNewTabAfterCurrentTab(nullptr) , m_splitView(nullptr) @@ -117,6 +119,11 @@ FoldersTabsSettingsPage::FoldersTabsSettingsPage(QWidget *parent) topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); // Tabs properties + m_alwaysShowTabBar = new QCheckBox(i18nc("@option:check", "Always show tab bar")); + topLayout->addRow(i18nc("@label:checkbox", "Tab bar:"), m_alwaysShowTabBar); + m_showCloseButtonOnTabs = new QCheckBox(i18nc("@option:check", "Show close button on tabs")); + topLayout->addRow(QString(), m_showCloseButtonOnTabs); + m_openNewTabAfterCurrentTab = new QRadioButton(i18nc("option:radio", "After current tab")); m_openNewTabAfterLastTab = new QRadioButton(i18nc("option:radio", "At end of tab bar")); QButtonGroup *tabsBehaviorGroup = new QButtonGroup(this); @@ -165,6 +172,9 @@ FoldersTabsSettingsPage::FoldersTabsSettingsPage(QWidget *parent) connect(m_closeSplitComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &FoldersTabsSettingsPage::changed); + connect(m_alwaysShowTabBar, &QCheckBox::toggled, this, &FoldersTabsSettingsPage::changed); + connect(m_showCloseButtonOnTabs, &QCheckBox::toggled, this, &FoldersTabsSettingsPage::changed); + connect(m_openNewTabAfterCurrentTab, &QRadioButton::toggled, this, &FoldersTabsSettingsPage::changed); connect(m_openNewTabAfterLastTab, &QRadioButton::toggled, this, &FoldersTabsSettingsPage::changed); } @@ -209,6 +219,9 @@ void FoldersTabsSettingsPage::applySettings() settings->setOpenExternallyCalledFolderInNewTab(m_openExternallyCalledFolderInNewTab->isChecked()); settings->setShowFullPathInTitlebar(m_showFullPathInTitlebar->isChecked()); + settings->setAlwaysShowTabBar(m_alwaysShowTabBar->isChecked()); + settings->setShowCloseButtonOnTabs(m_showCloseButtonOnTabs->isChecked()); + settings->setOpenNewTabAfterLastTab(m_openNewTabAfterLastTab->isChecked()); settings->save(); @@ -289,6 +302,9 @@ void FoldersTabsSettingsPage::loadSettings() m_closeSplitComboBox->setCurrentIndex(GeneralSettings::closeSplitViewChoice()); + m_alwaysShowTabBar->setChecked(GeneralSettings::alwaysShowTabBar()); + m_showCloseButtonOnTabs->setChecked(GeneralSettings::showCloseButtonOnTabs()); + m_openNewTabAfterLastTab->setChecked(GeneralSettings::openNewTabAfterLastTab()); m_openNewTabAfterCurrentTab->setChecked(!m_openNewTabAfterLastTab->isChecked()); } |
