┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinmainwindow.cpp
diff options
context:
space:
mode:
authorAkseli Lahtinen <[email protected]>2025-04-12 16:28:38 +0000
committerAkseli Lahtinen <[email protected]>2025-04-12 16:28:38 +0000
commit9d60570ca784000cb5ef78b13861eee58117595d (patch)
tree4a228a59d48794ed5a97173bed1277e071033e1d /src/dolphinmainwindow.cpp
parent1da33986b4fef14fcce0b8ddb4aaa722de074ce6 (diff)
DolphinNavigator: Hide the KUrlNavigator background if DolphinNavigator is outside of toolbar
When the DolphinNavigator is outside of the toolbar, it's better to hide the background for better looks. This change works only when Dolphin is built against KIO 6.14.
Diffstat (limited to 'src/dolphinmainwindow.cpp')
-rw-r--r--src/dolphinmainwindow.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 12b8be955..efcd4190e 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -236,6 +236,7 @@ DolphinMainWindow::DolphinMainWindow()
}
updateAllowedToolbarAreas();
+ updateNavigatorsBackground();
// enable middle-click on back/forward/up to open in a new tab
auto *middleClickEventFilter = new MiddleClickActionEventFilter(this);
@@ -2760,6 +2761,12 @@ void DolphinMainWindow::updateAllowedToolbarAreas()
}
}
+void DolphinMainWindow::updateNavigatorsBackground()
+{
+ auto navigators = static_cast<DolphinNavigatorsWidgetAction *>(actionCollection()->action(QStringLiteral("url_navigators")));
+ navigators->setBackgroundEnabled(navigators->isInToolbar());
+}
+
bool DolphinMainWindow::isKompareInstalled() const
{
static bool initialized = false;
@@ -2946,6 +2953,7 @@ void DolphinMainWindow::saveNewToolbarConfig()
m_tabWidget->currentTabPage()->insertNavigatorsWidget(navigators);
}
updateAllowedToolbarAreas();
+ updateNavigatorsBackground();
(static_cast<KHamburgerMenu *>(actionCollection()->action(KStandardAction::name(KStandardAction::HamburgerMenu))))->hideActionsOf(toolBar());
}