Commit 1a89e3ba authored by Alfonso Murolo's avatar Alfonso Murolo Committed by Kurt Hindenburg
Browse files

Only enable maximize terminal button in split header bar when usable

Disable the maximize terminal button when there is only one split
in a tab.

BUG: 435029
parent 5b1f3c6d
Pipeline #118697 passed with stage
in 3 minutes and 56 seconds
......@@ -278,12 +278,14 @@ void TerminalHeaderBar::applyVisibilitySettings()
{
auto *settings = KonsoleSettings::self();
auto toVisibility = settings->splitViewVisibility();
const bool singleTerminalView = (getTopLevelSplitter()->findChildren<TerminalDisplay *>().count() == 1);
switch (toVisibility) {
case KonsoleSettings::AlwaysShowSplitHeader:
m_toggleExpandedMode->setDisabled(singleTerminalView);
setVisible(true);
break;
case KonsoleSettings::ShowSplitHeaderWhenNeeded: {
const bool visible = !(getTopLevelSplitter()->findChildren<TerminalDisplay *>().count() == 1);
const bool visible = !(singleTerminalView);
setVisible(visible);
} break;
case KonsoleSettings::AlwaysHideSplitHeader:
......@@ -293,4 +295,5 @@ void TerminalHeaderBar::applyVisibilitySettings()
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment