Commit 8d7b6dc4 authored by David Edmundson's avatar David Edmundson
Browse files

Merge branch 'Plasma/5.11'

parents c8c2d9da fbbdfa10
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <KConfigGroup> #include <KConfigGroup>
#include <KLocalizedString> #include <KLocalizedString>
#include <KPluginFactory> #include <KPluginFactory>
#include <KWindowSystem>
#include "../krdb/krdb.h" #include "../krdb/krdb.h"
...@@ -742,7 +743,13 @@ void KFonts::load() ...@@ -742,7 +743,13 @@ void KFonts::load()
KConfig _cfgfonts("kcmfonts"); KConfig _cfgfonts("kcmfonts");
KConfigGroup cfgfonts(&_cfgfonts, "General"); KConfigGroup cfgfonts(&_cfgfonts, "General");
int dpicfg = cfgfonts.readEntry("forceFontDPI", 0); int dpicfg;
if (KWindowSystem::isPlatformWayland()) {
dpicfg = cfgfonts.readEntry("forceFontDPIWayland", 0);
} else {
dpicfg = cfgfonts.readEntry("forceFontDPI", 0);
}
if (dpicfg <= 0) { if (dpicfg <= 0) {
checkboxForceDpi->setChecked(false); checkboxForceDpi->setChecked(false);
spinboxDpi->setValue(96); spinboxDpi->setValue(96);
...@@ -776,7 +783,11 @@ void KFonts::save() ...@@ -776,7 +783,11 @@ void KFonts::save()
KConfig _cfgfonts("kcmfonts"); KConfig _cfgfonts("kcmfonts");
KConfigGroup cfgfonts(&_cfgfonts, "General"); KConfigGroup cfgfonts(&_cfgfonts, "General");
int dpi = (checkboxForceDpi->isChecked() ? spinboxDpi->value() : 0); int dpi = (checkboxForceDpi->isChecked() ? spinboxDpi->value() : 0);
cfgfonts.writeEntry("forceFontDPI", dpi); if (KWindowSystem::isPlatformWayland()) {
cfgfonts.writeEntry("forceFontDPIWayland", dpi);
} else {
cfgfonts.writeEntry("forceFontDPI", dpi);
}
#if defined(HAVE_FONTCONFIG) && defined (HAVE_X11) #if defined(HAVE_FONTCONFIG) && defined (HAVE_X11)
cfgfonts.writeEntry("dontChangeAASettings", cbAA->currentIndex() == AASystem); cfgfonts.writeEntry("dontChangeAASettings", cbAA->currentIndex() == AASystem);
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment