Commit 94732eb8 authored by Mikhail Zolotukhin's avatar Mikhail Zolotukhin Committed by Nate Graham
Browse files

Update GTK settings according to Plasma settings

Summary:
To increase usability,

- fonts
- icon theme
- cursor theme
- toolbar style (icons-only, text below buttons etc)
- icons visibility in menus
- icons visibility on buttons

settings for gtk applications are now set in respective kcms, instead of separate gtk kcm.

Various kcms are sending signals (dbus or Qt ones) about the configuration change. Then the gtkconfig kded daemon connects to these signals and changes gtk config files to match new settings, that were set in those kcms.

D24701 is needed to notify about cursor change on Wayland.

Live reloading (on a fly) is not going to work for some settings on X11. This applies to cursor theme, it's changed by partially. To illustrate that open Nautilus File Manager, change cursor theme and try to double click folders. You will see, that "loading" cursor changed its theme, but "idle" one did not.

What is not tested:
- Toolbar style for gtk3 apps other that Geany (absence of live reloading may be a Geany bug)
- Toolbar style and icons visibility on Wayland

Depends on D24701

BUG: 401507

BUG: 375272

BUG: 411097

FIXED-IN: 5.18.0

Test Plan:
# To test gtk3 applications live reloading on X11, install xsettingsd.
# Restart kded5.
# Open gtk2 app, gtk3 app
# Change above mentioned settings in respective KCMs
# Check if gtk applications are changing their settings before (sometimes) and after their restart.

Rare cases:
- To test icons on buttons use Inkscape about window.
- To test toolbar style use Geany (gtk3, live reloading does not work) and BleachBit (gtk2)

Reviewers: #plasma, #vdg, broulik, cblack

Reviewed By: #plasma, broulik

Subscribers: ervin, ngraham, broulik, nicolasfella, plasma-devel

Tags: #plasma, #vdg

Maniphest Tasks: T10611

Differential Revision: https://phabricator.kde.org/D24743
parent 21f5b87b
......@@ -6,7 +6,7 @@ find_package(ECM 0.0.9 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})
find_package(Qt5 REQUIRED NO_MODULE COMPONENTS Widgets Svg Test)
find_package(KF5 REQUIRED COMPONENTS I18n KIO ConfigWidgets NewStuff Archive KCMUtils IconThemes)
find_package(KF5 REQUIRED COMPONENTS I18n KIO ConfigWidgets NewStuff Archive KCMUtils IconThemes DBusAddons)
find_package(X11 REQUIRED)
find_package(GTK3 REQUIRED)
find_package(GSettingSchemas REQUIRED)
......@@ -67,6 +67,7 @@ add_subdirectory(gtkproxies)
add_subdirectory(gtk3proxies)
add_subdirectory(icons)
add_subdirectory(tests)
add_subdirectory(kded)
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
......
set(kscreen_daemon_SRCS
gtkconfig.cpp
configeditor.cpp
configvalueprovider.cpp
)
add_library(gtkconfig MODULE ${kscreen_daemon_SRCS})
target_compile_definitions(gtkconfig
PUBLIC
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
)
target_include_directories(gtkconfig
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${GTK3_INCLUDE_DIRS}
)
target_link_libraries(gtkconfig
Qt5::Gui
Qt5::DBus
KF5::CoreAddons
KF5::ConfigCore
KF5::DBusAddons
KF5::IconThemes
${GIO2_LIBRARY}
${GOBJECT2_LIBRARY}
)
install(TARGETS gtkconfig DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kded)
/*
* Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QDebug>
#include <QDir>
#include <QRegularExpression>
#include <QStandardPaths>
#include <QProcess>
#include <KSharedConfig>
#include <KConfigGroup>
#include <string>
#include <csignal>
#include <cstdio>
#include <gio/gio.h>
#include "configeditor.h"
static void replaceValueInGtkrcContents(QString &gtkrcContents, const QString &paramName, const QString &paramValue);
static void replaceValueInXSettingsdContents(QString &xSettingsdContents, const QString &paramName, const QString &paramValue);
static void reloadGtk2Apps();
static void reloadXSettingsd();
static QString readFileContents(QFile &gtkrc);
static pid_t pidOfXSettingsd();
void ConfigEditor::setGtk3ConfigValueDconf(const QString &paramName, const QString &paramValue)
{
g_autoptr(GSettings) gsettings = g_settings_new("org.gnome.desktop.interface");
g_settings_set_string(gsettings, paramName.toUtf8().constData(), paramValue.toUtf8().constData());
}
void ConfigEditor::setGtk3ConfigValueSettingsIni(const QString &paramName, const QString &paramValue)
{
QString configLocation = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation);
QString gtk3ConfigPath = configLocation + QStringLiteral("/gtk-3.0/settings.ini");
KSharedConfig::Ptr gtk3Config = KSharedConfig::openConfig(gtk3ConfigPath, KConfig::NoGlobals);
KConfigGroup group = gtk3Config->group(QStringLiteral("Settings"));
group.writeEntry(paramName, paramValue);
group.sync();
}
void ConfigEditor::setGtk3ConfigValueXSettingsd(const QString &paramName, const QString &paramValue)
{
using qsp = QStandardPaths;
QString configLocation = qsp::writableLocation(qsp::GenericConfigLocation);
QDir xsettingsdPath = configLocation + QStringLiteral("/xsettingsd");
if (!xsettingsdPath.exists()) {
xsettingsdPath.mkpath(QStringLiteral("."));
}
QString xSettingsdConfigPath = xsettingsdPath.path() + QStringLiteral("/xsettingsd.conf");
QFile xSettingsdConfig(xSettingsdConfigPath);
QString xSettingsdConfigContents = readFileContents(xSettingsdConfig);
replaceValueInXSettingsdContents(xSettingsdConfigContents, paramName, paramValue);
xSettingsdConfig.remove();
xSettingsdConfig.open(QIODevice::WriteOnly | QIODevice::Text);
xSettingsdConfig.write(xSettingsdConfigContents.toUtf8());
reloadXSettingsd();
}
void ConfigEditor::setGtk2ConfigValue(const QString &paramName, const QString &paramValue)
{
QString gtkrcPath = QDir::homePath() + QStringLiteral("/.gtkrc-2.0");
QFile gtkrc(gtkrcPath);
QString gtkrcContents = readFileContents(gtkrc);
replaceValueInGtkrcContents(gtkrcContents, paramName, paramValue);
gtkrc.remove();
gtkrc.open(QIODevice::WriteOnly | QIODevice::Text);
gtkrc.write(gtkrcContents.toUtf8());
reloadGtk2Apps();
}
static QString readFileContents(QFile &file)
{
if (file.open(QIODevice::ReadWrite | QIODevice::Text)) {
return file.readAll();
} else {
return QString();
}
}
static void replaceValueInGtkrcContents(QString &gtkrcContents, const QString &paramName, const QString &paramValue)
{
const QRegularExpression regExp(paramName + QStringLiteral("=[^\n]*($|\n)"));
static const QStringList nonStringProperties{
QStringLiteral("gtk-toolbar-style"),
QStringLiteral("gtk-menu-images"),
QStringLiteral("gtk-button-images"),
QStringLiteral("gtk-primary-button-warps-slider"),
};
QString newConfigString;
if (nonStringProperties.contains(paramName)) {
newConfigString = paramName + QStringLiteral("=") + paramValue + QStringLiteral("\n");
} else {
newConfigString = paramName + QStringLiteral("=\"") + paramValue + QStringLiteral("\"\n");
}
if (gtkrcContents.contains(regExp)) {
gtkrcContents.replace(regExp, newConfigString);
} else {
gtkrcContents = newConfigString + QStringLiteral("\n") + gtkrcContents;
}
}
static void replaceValueInXSettingsdContents(QString &xSettingsdContents, const QString &paramName, const QString &paramValue)
{
const QRegularExpression regExp(paramName + QStringLiteral(" [^\n]*($|\n)"));
static const QStringList nonStringProperties{
QStringLiteral("Gtk/ButtonImages"),
QStringLiteral("Gtk/MenuImages"),
QStringLiteral("Gtk/ToolbarStyle"),
};
QString newConfigString;
if (nonStringProperties.contains(paramName)) {
newConfigString = paramName + QStringLiteral(" ") + paramValue + QStringLiteral("\n");
} else {
newConfigString = paramName + QStringLiteral(" \"") + paramValue + QStringLiteral("\"\n");
}
if (xSettingsdContents.contains(regExp)) {
xSettingsdContents.replace(regExp, newConfigString);
} else {
xSettingsdContents = newConfigString + QStringLiteral("\n") + xSettingsdContents;
}
}
static void reloadGtk2Apps()
{
QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("reload_gtk_apps")));
}
static void reloadXSettingsd()
{
pid_t xSettingsdPid = pidOfXSettingsd();
if (xSettingsdPid == 0) {
QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("xsettingsd")));
} else {
kill(xSettingsdPid, SIGHUP);
}
}
static pid_t pidOfXSettingsd()
{
QProcess pidof;
pidof.start(QStringLiteral("pidof"), QStringList() << QStringLiteral("-s") << QStringLiteral("xsettingsd"));
pidof.waitForFinished();
QString xsettingsdPid = QString(pidof.readAllStandardOutput()).remove('\n');
return xsettingsdPid.toInt();
}
/*
* Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <unistd.h>
class QString;
class QFile;
namespace ConfigEditor
{
void setGtk2ConfigValue(const QString &paramName, const QString &paramValue);
void setGtk3ConfigValueDconf(const QString &paramName, const QString &paramValue);
void setGtk3ConfigValueSettingsIni(const QString &paramName, const QString &paramValue);
void setGtk3ConfigValueXSettingsd(const QString &paramName, const QString &paramValue);
};
/*
* Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QFont>
#include <QString>
#include <KConfig>
#include <KIconTheme>
#include <KSharedConfig>
#include <KConfigGroup>
#include "configvalueprovider.h"
ConfigValueProvider::ConfigValueProvider() :
kdeglobalsConfig(KSharedConfig::openConfig(QStringLiteral("kdeglobals"))),
inputConfig(KSharedConfig::openConfig(QStringLiteral("kcminputrc")))
{
}
QString ConfigValueProvider::fontName() const
{
static const QFont defaultFont(QStringLiteral("Noto Sans"), 10);
kdeglobalsConfig->reparseConfiguration();
KConfigGroup configGroup = kdeglobalsConfig->group(QStringLiteral("General"));
QString fontAsString = configGroup.readEntry(QStringLiteral("font"), defaultFont.toString());
static QFont font;
font.fromString(fontAsString);
return font.family() + ' ' + font.styleName() + ' ' + QString::number(font.pointSize());
}
QString ConfigValueProvider::iconThemeName() const
{
KIconTheme *newIconTheme = KIconLoader::global()->theme();
if (newIconTheme) {
return newIconTheme->internalName();
} else {
return QStringLiteral("breeze");
}
}
QString ConfigValueProvider::cursorThemeName() const
{
inputConfig->reparseConfiguration();
KConfigGroup configGroup = inputConfig->group(QStringLiteral("Mouse"));
return configGroup.readEntry(QStringLiteral("cursorTheme"));
}
QString ConfigValueProvider::iconsOnButtons() const
{
kdeglobalsConfig->reparseConfiguration();
KConfigGroup configGroup = kdeglobalsConfig->group(QStringLiteral("KDE"));
bool kdeConfigValue = configGroup.readEntry(QStringLiteral("ShowIconsOnPushButtons"), true);
if (kdeConfigValue) {
return QStringLiteral("1");
} else {
return QStringLiteral("0");
}
}
QString ConfigValueProvider::iconsInMenus() const
{
kdeglobalsConfig->reparseConfiguration();
KConfigGroup configGroup = kdeglobalsConfig->group(QStringLiteral("KDE"));
bool kdeConfigValue = configGroup.readEntry(QStringLiteral("ShowIconsInMenuItems"), true);
if (kdeConfigValue) {
return QStringLiteral("1");
} else {
return QStringLiteral("0");
}
}
QString ConfigValueProvider::toolbarStyle(ConfigValueProvider::ToolbarStyleNotation notation) const
{
kdeglobalsConfig->reparseConfiguration();
KConfigGroup configGroup = kdeglobalsConfig->group(QStringLiteral("Toolbar style"));
QString kdeConfigValue = configGroup.readEntry(QStringLiteral("ToolButtonStyle"), "TextBesideIcon");
return toolbarStyleInDesiredNotation(kdeConfigValue, notation);
}
QString ConfigValueProvider::toolbarStyleInDesiredNotation(const QString &kdeConfigValue, ConfigValueProvider::ToolbarStyleNotation notation) const
{
QStringList toolbarStyles {};
if (notation == ToolbarStyleNotation::SettingsIni) {
toolbarStyles.append({
QStringLiteral("GTK_TOOLBAR_ICONS"),
QStringLiteral("GTK_TOOLBAR_TEXT"),
QStringLiteral("GTK_TOOLBAR_BOTH_HORIZ"),
QStringLiteral("GTK_TOOLBAR_BOTH")
});
} else if (notation == ToolbarStyleNotation::Xsettingsd) {
toolbarStyles.append({
QStringLiteral("0"),
QStringLiteral("1"),
QStringLiteral("3"),
QStringLiteral("2")
});
} else {
toolbarStyles.append({
QStringLiteral("icons"),
QStringLiteral("text"),
QStringLiteral("both-horiz"),
QStringLiteral("both")
});
}
if (kdeConfigValue == QStringLiteral("NoText")) {
return toolbarStyles[0];
} else if (kdeConfigValue == QStringLiteral("TextOnly")) {
return toolbarStyles[1];
} else if (kdeConfigValue == QStringLiteral("TextBesideIcon")) {
return toolbarStyles[2];
} else {
return toolbarStyles[3];
}
}
/*
* Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <KSharedConfig>
class QString;
class QFont;
class ConfigValueProvider
{
public:
enum class ToolbarStyleNotation {
Xsettingsd = 0,
SettingsIni,
Dconf
};
ConfigValueProvider();
QString fontName() const;
QString iconThemeName() const;
QString cursorThemeName() const;
QString iconsOnButtons() const;
QString iconsInMenus() const;
QString toolbarStyle(ToolbarStyleNotation notation) const;
private:
QString toolbarStyleInDesiredNotation(const QString &kdeConfigValue, ToolbarStyleNotation notation) const;
KSharedConfigPtr kdeglobalsConfig;
KSharedConfigPtr inputConfig;
};
/*
* Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com>
* Copyright (C) 2019 Nicolas Fella <nicolas.fella@gmx.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QDebug>
#include <QFont>
#include <QDBusConnection>
#include <QGuiApplication>
#include <KIconLoader>
#include <KPluginFactory>
#include "gtkconfig.h"
#include "configvalueprovider.h"
K_PLUGIN_CLASS_WITH_JSON(GtkConfig, "gtkconfig.json")
GtkConfig::GtkConfig(QObject *parent, const QVariantList&) :
KDEDModule(parent),
configValueProvider(new ConfigValueProvider())
{
connect(qGuiApp, &QGuiApplication::fontChanged, this, &GtkConfig::setFont);
connect(KIconLoader::global(), &KIconLoader::iconChanged, this, &GtkConfig::setIconTheme);
QDBusConnection::sessionBus().connect(QString(),
QStringLiteral("/KGlobalSettings"),
QStringLiteral("org.kde.KGlobalSettings"),
QStringLiteral("notifyChange"),
this,
SLOT(onGlobalSettingsChange(int,int)));
applyAllSettings();
}
void GtkConfig::setFont() const
{
const QString configFontName = configValueProvider->fontName();
ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-font-name"), configFontName);
ConfigEditor::setGtk3ConfigValueDconf(QStringLiteral("font-name"), configFontName);
ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-font-name"), configFontName);
ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/FontName"), configFontName);
}
void GtkConfig::setIconTheme(int iconGroup) const
{
if (iconGroup == KIconLoader::Group::Desktop) { // This is needed to update icons only once
const QString iconThemeName = configValueProvider->iconThemeName();
ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-icon-theme-name"), iconThemeName);
ConfigEditor::setGtk3ConfigValueDconf(QStringLiteral("icon-theme"), iconThemeName);
ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-icon-theme-name"), iconThemeName);
ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Net/IconThemeName"), iconThemeName);
}
}
void GtkConfig::setCursorTheme() const
{
const QString cursorThemeName = configValueProvider->cursorThemeName();
ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-cursor-theme-name"), cursorThemeName);
ConfigEditor::setGtk3ConfigValueDconf(QStringLiteral("cursor-theme"), cursorThemeName);
ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-cursor-theme-name"), cursorThemeName);
ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/CursorThemeName"), cursorThemeName);
}
void GtkConfig::setIconsOnButtons() const
{
const QString iconsOnButtonsConfigValue = configValueProvider->iconsOnButtons();
ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-button-images"), iconsOnButtonsConfigValue);
ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-button-images"), iconsOnButtonsConfigValue);
ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/ButtonImages"), iconsOnButtonsConfigValue);
}
void GtkConfig::setIconsInMenus() const
{
const QString iconsInMenusConfigValue = configValueProvider->iconsInMenus();
ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-menu-images"), iconsInMenusConfigValue);
ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-menu-images"), iconsInMenusConfigValue);
ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/MenuImages"), iconsInMenusConfigValue);
}
void GtkConfig::setToolbarStyle() const
{
using ToolbarStyleNotation = ConfigValueProvider::ToolbarStyleNotation;
QString toolbarStyleSettingsIni = configValueProvider->toolbarStyle(ToolbarStyleNotation::SettingsIni);
QString toolbarStyleDConf = configValueProvider->toolbarStyle(ToolbarStyleNotation::Dconf);
QString toolbarStyleXSettingsd = configValueProvider->toolbarStyle(ToolbarStyleNotation::Xsettingsd);
ConfigEditor::setGtk2ConfigValue(QStringLiteral("gtk-toolbar-style"), toolbarStyleSettingsIni);
ConfigEditor::setGtk3ConfigValueDconf(QStringLiteral("toolbar-style"), toolbarStyleDConf);
ConfigEditor::setGtk3ConfigValueSettingsIni(QStringLiteral("gtk-toolbar-style"), toolbarStyleSettingsIni);
ConfigEditor::setGtk3ConfigValueXSettingsd(QStringLiteral("Gtk/ToolbarStyle"), toolbarStyleXSettingsd);
}
void GtkConfig::applyAllSettings() const
{
setFont();
setIconTheme(KIconLoader::Group::Desktop);
setCursorTheme();
setIconsOnButtons();
setIconsInMenus();
setToolbarStyle();
}
void GtkConfig::onGlobalSettingsChange(int settingsChangeType, int arg) const
{
SettingsChangeType changeType = static_cast<SettingsChangeType>(settingsChangeType);
SettingsCategory settingsCategory = static_cast<SettingsCategory>(arg);
if (changeType == SettingsChangeType::Cursor) {
setCursorTheme();
} else if (changeType == SettingsChangeType::Settings && settingsCategory == SettingsCategory::Style) {
setIconsOnButtons();
setIconsInMenus();
setToolbarStyle();
}
}
#include "gtkconfig.moc"
/*
* Copyright (C) 2019 Mikhail Zolotukhin <zomial@protonmail.com>
* Copyright (C) 2019 Nicolas Fella <nicolas.fella@gmx.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <KDEDModule>
#include "configeditor.h"
#include "configvalueprovider.h"
class Q_DECL_EXPORT GtkConfig : public KDEDModule