2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Move QT_FONT_DPI workaround to Qt patches

This commit is contained in:
Ilya Fedin
2022-05-31 13:06:19 +04:00
committed by John Preston
parent 391a3a77f6
commit 0a876226fe
2 changed files with 2 additions and 11 deletions

View File

@@ -31,7 +31,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QLockFile>
#include <QtGui/QSessionManager>
#include <QtGui/QScreen>
#include <qpa/qplatformscreen.h>
namespace Core {
namespace {
@@ -219,11 +218,7 @@ void Sandbox::launchApplication() {
}
void Sandbox::setupScreenScale() {
constexpr auto processDpi = [](const QDpi &dpi) {
return (dpi.first + dpi.second) * 0.5;
};
const auto dpi = processDpi(
Sandbox::primaryScreen()->handle()->logicalDpi());
const auto dpi = Sandbox::primaryScreen()->logicalDotsPerInch();
LOG(("Primary screen DPI: %1").arg(dpi));
if (dpi <= 108) {
cSetScreenScale(100); // 100%: 96 DPI (0-108)