From 169a2a97848b90b3c50e5189bf181bffc12e37de Mon Sep 17 00:00:00 2001 From: Akira Ohgaki <akiraohgaki@gmail.com> Date: Wed, 28 Jun 2017 11:35:07 +0900 Subject: [PATCH] Apply gtk3 theme with xfce --- app/src/handlers/systemhandler.cpp | 11 ++++++++++- app/src/handlers/systemhandler.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/handlers/systemhandler.cpp b/app/src/handlers/systemhandler.cpp index b547e41..6ea5ad7 100644 --- a/app/src/handlers/systemhandler.cpp +++ b/app/src/handlers/systemhandler.cpp @@ -112,7 +112,8 @@ bool SystemHandler::isApplicableType(const QString &installType) const else if (desktop == "xfce") { applicableTypes << "wallpapers" << "icons" - << "cursors"; + << "cursors" + << "gtk3_themes"; } return applicableTypes.contains(installType); @@ -169,6 +170,9 @@ bool SystemHandler::applyFile(const QString &path, const QString &installType) c else if (installType == "cursors") { return applyXfceCursor(themeName); } + else if (installType == "gtk3_themes") { + return applyXfceGtk3Theme(themeName); + } } } @@ -319,4 +323,9 @@ bool SystemHandler::applyXfceCursor(const QString &themeName) const { return setConfigWithXfconf("xsettings", "/Gtk/CursorThemeName", themeName); } + +bool SystemHandler::applyXfceGtk3Theme(const QString &themeName) const +{ + return setConfigWithXfconf("xsettings", "/Net/ThemeName", themeName); +} #endif diff --git a/app/src/handlers/systemhandler.h b/app/src/handlers/systemhandler.h index a392228..918e58d 100644 --- a/app/src/handlers/systemhandler.h +++ b/app/src/handlers/systemhandler.h @@ -41,5 +41,6 @@ private: bool applyXfceWallpaper(const QString &path) const; bool applyXfceIcon(const QString &themeName) const; bool applyXfceCursor(const QString &themeName) const; + bool applyXfceGtk3Theme(const QString &themeName) const; #endif }; -- GitLab