From 9142bae92949a4929655b99ce4124e44380da43c Mon Sep 17 00:00:00 2001 From: Kostiantyn Korchuhanov Date: Wed, 13 Aug 2025 08:58:00 +0000 Subject: Add a Window Color Scheme menu in the Configure menu The menu is located at Menu -> Configure -> Window color scheme Either in menu or hamburger mode. FEATURE: 506618 --- src/dolphinmainwindow.cpp | 12 ++++++++++++ src/dolphinui.rc | 5 ++++- src/dolphinuiforphones.rc | 5 ++++- 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 51772eac2..ba2b51323 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -1580,6 +1581,8 @@ void DolphinMainWindow::updateHamburgerMenu() // The "Configure" menu is not added to the actionCollection() because there is hardly // a good reason for users to put it on their toolbar. auto configureMenu = menu->addMenu(QIcon::fromTheme(QStringLiteral("configure")), i18nc("@action:inmenu menu for configure actions", "Configure")); + configureMenu->addAction(actionCollection()->action(QStringLiteral("window_color_sheme"))); + configureMenu->addSeparator(); configureMenu->addAction(ac->action(KStandardAction::name(KStandardAction::SwitchApplicationLanguage))); configureMenu->addAction(ac->action(KStandardAction::name(KStandardAction::KeyBindings))); configureMenu->addAction(ac->action(KStandardAction::name(KStandardAction::ConfigureToolbars))); @@ -2246,6 +2249,15 @@ void DolphinMainWindow::setupActions() openInSplitView(QUrl()); }); + // Window color scheme menu + auto *manager = KColorSchemeManager::instance(); + KActionMenu *selectionMenu = KColorSchemeMenu::createMenu(manager, this); + auto windowColorSchemeMenu = new QAction(this); + windowColorSchemeMenu->setMenu(selectionMenu->menu()); + windowColorSchemeMenu->menu()->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-color"))); + windowColorSchemeMenu->menu()->setTitle(i18n("&Window Color Scheme")); + actionCollection()->addAction(QStringLiteral("window_color_sheme"), windowColorSchemeMenu); + m_recentFiles = new KRecentFilesAction(this); } diff --git a/src/dolphinui.rc b/src/dolphinui.rc index 3e6e4c463..6bac6a193 100644 --- a/src/dolphinui.rc +++ b/src/dolphinui.rc @@ -1,6 +1,6 @@ - + @@ -77,6 +77,9 @@ + + + diff --git a/src/dolphinuiforphones.rc b/src/dolphinuiforphones.rc index 0189c3bb6..7e9d72c8e 100644 --- a/src/dolphinuiforphones.rc +++ b/src/dolphinuiforphones.rc @@ -1,6 +1,6 @@ - + @@ -77,6 +77,9 @@ + + + -- cgit v1.3