Get rid of DisableCustomScaling hack

This shouldn't be needed since Qt is built without High-DPI scaling support in official binaries and QT_SCALE_FACTOR is a debug environment variable, so any use of it is a user's environment misconfiguration.

https://doc.qt.io/qt-6/highdpi.html#environment-variable-reference
This commit is contained in:
Ilya Fedin 2022-05-19 09:03:13 +04:00 committed by John Preston
parent 92df401963
commit 6b469e469f
2 changed files with 0 additions and 8 deletions

View file

@ -14,7 +14,6 @@
#include <QtGui/QtEvents> #include <QtGui/QtEvents>
#include <QWheelEvent> #include <QWheelEvent>
#include <private/qguiapplication_p.h>
#include <private/qhighdpiscaling_p.h> #include <private/qhighdpiscaling_p.h>
#include <array> #include <array>
@ -214,11 +213,6 @@ bool IsContentVisible(
&& !widget->window()->isMinimized(); && !widget->window()->isMinimized();
} }
void DisableCustomScaling() {
QHighDpiScaling::setGlobalFactor(1);
QGuiApplicationPrivate::resetCachedDevicePixelRatio();
}
int WheelDirection(not_null<QWheelEvent*> e) { int WheelDirection(not_null<QWheelEvent*> e) {
// Only a mouse wheel is accepted. // Only a mouse wheel is accepted.
constexpr auto step = static_cast<int>(QWheelEvent::DefaultDeltasPerStep); constexpr auto step = static_cast<int>(QWheelEvent::DefaultDeltasPerStep);

View file

@ -194,8 +194,6 @@ QPointer<const Widget> MakeWeak(not_null<const Widget*> object) {
not_null<QWidget*> widget, not_null<QWidget*> widget,
const QRect &rect = QRect()); const QRect &rect = QRect());
void DisableCustomScaling();
int WheelDirection(not_null<QWheelEvent*> e); int WheelDirection(not_null<QWheelEvent*> e);
} // namespace Ui } // namespace Ui