Changeset View
Changeset View
Standalone View
Standalone View
src/settings/TabBarSettings.cpp
Show All 20 Lines | |||||
21 | // Own | 21 | // Own | ||
22 | #include "TabBarSettings.h" | 22 | #include "TabBarSettings.h" | ||
23 | 23 | | |||
24 | using namespace Konsole; | 24 | using namespace Konsole; | ||
25 | 25 | | |||
26 | TabBarSettings::TabBarSettings(QWidget* aParent) : QWidget(aParent) | 26 | TabBarSettings::TabBarSettings(QWidget* aParent) : QWidget(aParent) | ||
27 | { | 27 | { | ||
28 | setupUi(this); | 28 | setupUi(this); | ||
29 | | ||||
30 | // Enable CSS file selector only when tabbar is visible and custom css is active | ||||
31 | const auto updateStyleSheetFileEnable = [this](bool) { | ||||
32 | kcfg_TabBarUserStyleSheetFile->setEnabled(kcfg_TabBarUseUserStyleSheet->isChecked() | ||||
33 | && !AlwaysHideTabBar->isChecked()); | ||||
34 | }; | ||||
35 | connect(kcfg_TabBarUseUserStyleSheet, &QAbstractButton::toggled, | ||||
36 | this, updateStyleSheetFileEnable); | ||||
37 | connect(AlwaysHideTabBar, &QAbstractButton::toggled, | ||||
38 | this, updateStyleSheetFileEnable); | ||||
29 | } | 39 | } | ||
30 | 40 | | |||
31 | TabBarSettings::~TabBarSettings() = default; | 41 | TabBarSettings::~TabBarSettings() = default; | ||
32 | 42 | |