]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinnavigatorswidgetaction.cpp
GIT_SILENT Sync po/docbooks with svn
[dolphin.git] / src / dolphinnavigatorswidgetaction.cpp
index 0095869b16446f2aacdd9ad2aefcbaa21a8e37b5..ef99d1cb701321b726a4409bf863472fd7b65161 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "trash/dolphintrash.h"
 
+#include <KCoreAddons>
 #include <KLocalizedString>
 #include <KNotificationJobUiDelegate>
 #include <KService>
@@ -102,6 +103,9 @@ void DolphinNavigatorsWidgetAction::createSecondaryUrlNavigator()
     Q_ASSERT(m_splitter->count() == 1);
     m_splitter->addWidget(createNavigatorWidget(Secondary));
     Q_ASSERT(m_splitter->count() == 2);
+#if KIO_VERSION >= QT_VERSION_CHECK(6, 14, 0)
+    secondaryUrlNavigator()->setBackgroundEnabled(primaryUrlNavigator()->isBackgroundEnabled());
+#endif
     updateText();
 }
 
@@ -148,6 +152,20 @@ void DolphinNavigatorsWidgetAction::setSecondaryNavigatorVisible(bool visible)
     updateText();
 }
 
+void DolphinNavigatorsWidgetAction::setBackgroundEnabled(bool enabled)
+{
+#if KIO_VERSION >= QT_VERSION_CHECK(6, 14, 0)
+    m_splitter->setAutoFillBackground(!enabled);
+    m_splitter->setBackgroundRole(enabled ? QPalette::Window : QPalette::Base);
+    primaryUrlNavigator()->setBackgroundEnabled(enabled);
+    if (secondaryUrlNavigator()) {
+        secondaryUrlNavigator()->setBackgroundEnabled(enabled);
+    }
+#else
+    Q_UNUSED(enabled);
+#endif
+}
+
 QWidget *DolphinNavigatorsWidgetAction::createWidget(QWidget *parent)
 {
     QWidget *oldParent = m_splitter->parentWidget();