Adapt for Ui::DisableCustomScaling changes

This commit is contained in:
Ilya Fedin 2021-06-12 17:17:02 +04:00 committed by John Preston
parent eb228eb744
commit 766bc90921
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/base_platform_info.h"
#include "base/platform/base_platform_file_utilities.h"
#include "ui/main_queue_processor.h"
#include "ui/ui_utility.h"
#include "core/crash_reports.h"
#include "core/update_checker.h"
#include "core/sandbox.h"
@ -334,7 +333,6 @@ int Launcher::exec() {
// Must be started before Sandbox is created.
Platform::start();
Ui::DisableCustomScaling();
auto result = executeApplication();

View File

@ -25,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/qthelp_url.h"
#include "base/qthelp_regex.h"
#include "base/qt_adapters.h"
#include "ui/ui_utility.h"
#include "ui/effects/animations.h"
#include "app.h"
@ -182,6 +183,8 @@ void Sandbox::launchApplication() {
}
void Sandbox::setupScreenScale() {
Ui::DisableCustomScaling();
const auto dpi = Sandbox::primaryScreen()->logicalDotsPerInch();
LOG(("Primary screen DPI: %1").arg(dpi));
if (dpi <= 108) {