diff --git a/sddmauthhelper.cpp b/sddmauthhelper.cpp --- a/sddmauthhelper.cpp +++ b/sddmauthhelper.cpp @@ -114,7 +114,7 @@ copyFile(plasmarcSource.path(), plasmarcDestination.path()); } - // write cursor theme and NumLock preference to config file + // write cursor theme, scaling DPI, and NumLock preference to config file ActionReply reply = ActionReply::HelperErrorReply(); QSharedPointer sddmConfig = openConfig(args[QStringLiteral("kde_settings.conf")].toString()); QSharedPointer sddmOldConfig = openConfig(args[QStringLiteral("sddm.conf")].toString()); @@ -156,7 +156,7 @@ QFile::remove(sddmConfigLocation.path() + QStringLiteral("/kdeglobals")); QFile::remove(sddmConfigLocation.path() + QStringLiteral("/plasmarc")); - // remove cursor theme and NumLock preference from config file + // remove cursor theme, scaling DPI, and NumLock preference from config file ActionReply reply = ActionReply::HelperErrorReply(); QSharedPointer sddmConfig = openConfig(args[QStringLiteral("kde_settings.conf")].toString()); QSharedPointer sddmOldConfig = openConfig(args[QStringLiteral("sddm.conf")].toString()); diff --git a/src/advanceconfig.cpp b/src/advanceconfig.cpp --- a/src/advanceconfig.cpp +++ b/src/advanceconfig.cpp @@ -151,6 +151,10 @@ KConfigGroup cursorConfigGroup(&cursorConfig, "Mouse"); QVariant cursorTheme = cursorConfigGroup.readEntry("cursorTheme", QString()); + KConfig dpiConfig(QStringLiteral("kcmfonts")); + KConfigGroup dpiConfigGroup(&dpiConfig, "General"); + QString dpiValue = QStringLiteral("-dpi ") + dpiConfigGroup.readEntry("forceFontDPI"); + KConfig numLockConfig(QStringLiteral("kcminputrc")); KConfigGroup numLockConfigGroup(&numLockConfig, "Keyboard"); QString numLock = numLockConfigGroup.readEntry("NumLock"); @@ -174,6 +178,7 @@ args[QStringLiteral("kde_settings.conf")] = QString {QLatin1String(SDDM_CONFIG_DIR "/") + QStringLiteral("kde_settings.conf")}; args[QStringLiteral("sddm.conf")] = QLatin1String(SDDM_CONFIG_FILE); args[QStringLiteral("kde_settings.conf/Theme/CursorTheme")] = cursorTheme; + args[QStringLiteral("kde_settings.conf/X11/ServerArguments")] = dpiValue; if (!numLock.isEmpty()) { if (numLock == QStringLiteral("0")) { args[QStringLiteral("kde_settings.conf/General/Numlock")] = QStringLiteral("on"); @@ -218,6 +223,7 @@ args[QStringLiteral("sddm.conf")] = QLatin1String(SDDM_CONFIG_FILE); args[QStringLiteral("sddmUserConfig")] = sddmUserConfigPath; args[QStringLiteral("kde_settings.conf/Theme/CursorTheme")] = QVariant(); + args[QStringLiteral("kde_settings.conf/X11/ServerArguments")] = QVariant(); args[QStringLiteral("kde_settings.conf/General/Numlock")] = QVariant(); KAuth::Action resetAction(QStringLiteral("org.kde.kcontrol.kcmsddm.reset")); diff --git a/src/ui/advanceconfig.ui b/src/ui/advanceconfig.ui --- a/src/ui/advanceconfig.ui +++ b/src/ui/advanceconfig.ui @@ -7,7 +7,7 @@ 0 0 547 - 391 + 409 @@ -232,11 +232,11 @@ 320 - 70 + 90 - Settings synchronization allows you to transfer your theme customization (color scheme, font, font rendering, icon and Plasma theme) to SDDM. + Settings synchronization allows you to transfer the following Plasma settings to SDDM: color scheme, cursor theme, font, font rendering, NumLock preference, Plasma theme, and scaling DPI. false