Commit b6e41560 authored by David Edmundson's avatar David Edmundson
Browse files

Merge branch 'Plasma/5.11'

parents 8d7b6dc4 b47a841f
......@@ -36,6 +36,7 @@ target_link_libraries(kcolorschemeeditor
KF5::KIOCore
KF5::CoreAddons
KF5::NewStuff
KF5::WindowSystem
)
if(X11_FOUND)
target_link_libraries(kcolorschemeeditor ${X11_LIBRARIES} Qt5::X11Extras)
......@@ -76,7 +77,8 @@ target_link_libraries(kcm_colors
KF5::KIOCore
KF5::CoreAddons
Qt5::DBus
KF5::NewStuff)
KF5::NewStuff
KF5::WindowSystem)
if(X11_FOUND)
target_link_libraries(kcm_colors ${X11_LIBRARIES} Qt5::X11Extras)
......
......@@ -44,6 +44,7 @@
#include <kprocess.h>
#include <KLocalizedString>
#include <kdelibs4migration.h>
#include <KWindowSystem>
#include "krdb.h"
#if HAVE_X11
......@@ -534,8 +535,17 @@ void runRdb( uint flags )
KConfig _cfgfonts( QStringLiteral("kcmfonts") );
KConfigGroup cfgfonts(&_cfgfonts, "General");
if( cfgfonts.readEntry( "forceFontDPI", 0 ) != 0 )
contents += "Xft.dpi: " + cfgfonts.readEntry( "forceFontDPI" ) + '\n';
int dpi;
//even though this sets up the X rdb, we want to use the value the
//user has set to use when under wayland - as X apps will be scaled by the compositor
if (KWindowSystem::isPlatformWayland()) {
dpi = cfgfonts.readEntry( "forceFontDPIWayland", 0);
} else {
dpi = cfgfonts.readEntry( "forceFontDPI", 0);
}
if( dpi != 0 )
contents += "Xft.dpi: " + QString::number(dpi) + '\n';
else
{
KProcess proc;
......
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