Changeset View
Changeset View
Standalone View
Standalone View
kcm/kcm.cpp
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Line(s) | 363 | { | |||
---|---|---|---|---|---|
369 | 369 | | |||
370 | // Write env var to be used by session startup scripts to populate the QT_SCREEN_SCALE_FACTORS | 370 | // Write env var to be used by session startup scripts to populate the QT_SCREEN_SCALE_FACTORS | ||
371 | // env var. | 371 | // env var. | ||
372 | // We use QT_SCREEN_SCALE_FACTORS as opposed to QT_SCALE_FACTOR as we need to use one that will | 372 | // We use QT_SCREEN_SCALE_FACTORS as opposed to QT_SCALE_FACTOR as we need to use one that will | ||
373 | // NOT scale fonts according to the scale. | 373 | // NOT scale fonts according to the scale. | ||
374 | // Scaling the fonts makes sense if you don't also set a font DPI, but we NEED to set a font | 374 | // Scaling the fonts makes sense if you don't also set a font DPI, but we NEED to set a font | ||
375 | // DPI for both PlasmaShell which does it's own thing, and for KDE4/GTK2 applications. | 375 | // DPI for both PlasmaShell which does it's own thing, and for KDE4/GTK2 applications. | ||
376 | QString screenFactors; | 376 | QString screenFactors; | ||
377 | for (const KScreen::OutputPtr output : m_config->config()->outputs()) { | 377 | for (const auto &output: m_config->config()->outputs()) { | ||
378 | screenFactors.append(output->name() + QLatin1Char('=') + QString::number(m_globalScale) + QLatin1Char(';')); | 378 | screenFactors.append(output->name() + QLatin1Char('=') + QString::number(m_globalScale) + QLatin1Char(';')); | ||
379 | } | 379 | } | ||
380 | config->group("KScreen").writeEntry("ScreenScaleFactors", screenFactors); | 380 | config->group("KScreen").writeEntry("ScreenScaleFactors", screenFactors); | ||
381 | 381 | | |||
382 | KConfig fontConfig(QStringLiteral("kcmfonts")); | 382 | KConfig fontConfig(QStringLiteral("kcmfonts")); | ||
383 | auto fontConfigGroup = fontConfig.group("General"); | 383 | auto fontConfigGroup = fontConfig.group("General"); | ||
384 | 384 | | |||
385 | if (qFuzzyCompare(m_globalScale, 1.0)) { | 385 | if (qFuzzyCompare(m_globalScale, 1.0)) { | ||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |