合并双屏登录页面锁屏异常patch
This commit is contained in:
parent
4ee3153962
commit
8cf31fcae9
|
@ -59,6 +59,10 @@
|
|||
# define ARCH_PROCESSOR "x86_64"
|
||||
#elif defined(Q_PROCESSOR_IA64)
|
||||
# define ARCH_PROCESSOR "ia64"
|
||||
#elif defined(Q_PROCESSOR_LOONGARCH_64)
|
||||
# define ARCH_PROCESSOR "loongarch64"
|
||||
#elif defined(Q_PROCESSOR_LOONGARCH)
|
||||
# define ARCH_PROCESSOR "loongarch"
|
||||
#elif defined(Q_PROCESSOR_MIPS_64)
|
||||
# define ARCH_PROCESSOR "mips64"
|
||||
#elif defined(Q_PROCESSOR_MIPS)
|
||||
|
|
|
@ -228,6 +228,13 @@
|
|||
# define Q_PROCESSOR_WORDSIZE 8
|
||||
// Q_BYTE_ORDER not defined, use endianness auto-detection
|
||||
|
||||
#elif defined(_loongarch) || defined(__loongarch__)
|
||||
# define Q_PROCESSOR_LOONGARCH
|
||||
# if defined(__loongarch64)
|
||||
# define Q_PROCESSOR_LOONGARCH_64
|
||||
# define Q_PROCESSOR_WORDSIZE 8
|
||||
# endif
|
||||
|
||||
/*
|
||||
MIPS family, known revisions: I, II, III, IV, 32, 64
|
||||
|
||||
|
|
|
@ -396,10 +396,7 @@ qreal QHighDpiScaling::roundScaleFactor(qreal rawFactor)
|
|||
}
|
||||
|
||||
// Check application object if no environment value was set.
|
||||
if (scaleFactorRoundingPolicy == Qt::HighDpiScaleFactorRoundingPolicy::Unset) {
|
||||
scaleFactorRoundingPolicy = QGuiApplication::highDpiScaleFactorRoundingPolicy();
|
||||
} else {
|
||||
// Make application setting reflect environment
|
||||
if (scaleFactorRoundingPolicy != Qt::HighDpiScaleFactorRoundingPolicy::Unset) {
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(scaleFactorRoundingPolicy);
|
||||
}
|
||||
}
|
||||
|
@ -460,8 +457,6 @@ QDpi QHighDpiScaling::effectiveLogicalDpi(const QPlatformScreen *screen, qreal r
|
|||
policyText.constData(), values.constData());
|
||||
}
|
||||
}
|
||||
if (dpiAdjustmentPolicy == DpiAdjustmentPolicy::Unset)
|
||||
dpiAdjustmentPolicy = DpiAdjustmentPolicy::UpOnly;
|
||||
}
|
||||
|
||||
// Apply adjustment policy.
|
||||
|
@ -539,7 +534,7 @@ void QHighDpiScaling::updateHighDpiScaling()
|
|||
++i;
|
||||
}
|
||||
}
|
||||
m_active = m_globalScalingActive || m_screenFactorSet || m_pixelDensityScalingActive;
|
||||
m_active = m_globalScalingActive || m_usePixelDensity;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -684,9 +679,7 @@ QDpi QHighDpiScaling::logicalDpi(const QScreen *screen)
|
|||
return QDpi(96, 96);
|
||||
|
||||
if (!m_usePixelDensity) {
|
||||
const qreal screenScaleFactor = screenSubfactor(screen->handle());
|
||||
const QDpi dpi = QPlatformScreen::overrideDpi(screen->handle()->logicalDpi());
|
||||
return QDpi{ dpi.first / screenScaleFactor, dpi.second / screenScaleFactor };
|
||||
return screen->handle()->logicalDpi();
|
||||
}
|
||||
|
||||
const qreal scaleFactor = rawScaleFactor(screen->handle());
|
||||
|
|
|
@ -159,12 +159,12 @@ inline QVector2D scale(const QVector2D &value, qreal scaleFactor, QPointF /* ori
|
|||
|
||||
inline QPointF scale(const QPointF &pos, qreal scaleFactor, QPointF origin = QPointF(0, 0))
|
||||
{
|
||||
return (pos - origin) * scaleFactor + origin;
|
||||
return (pos - origin) * scaleFactor + origin * scaleFactor;
|
||||
}
|
||||
|
||||
inline QPoint scale(const QPoint &pos, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
{
|
||||
return (pos - origin) * scaleFactor + origin;
|
||||
return (pos - origin) * scaleFactor + origin * scaleFactor;
|
||||
}
|
||||
|
||||
inline QRect scale(const QRect &rect, qreal scaleFactor, QPoint origin = QPoint(0, 0))
|
||||
|
|
|
@ -410,6 +410,12 @@ QSize QScreen::availableSize() const
|
|||
QRect QScreen::geometry() const
|
||||
{
|
||||
Q_D(const QScreen);
|
||||
|
||||
if (d->platformScreen)
|
||||
{
|
||||
return QHighDpi::fromNativePixels(d->platformScreen->geometry(), this);
|
||||
}
|
||||
|
||||
return d->geometry;
|
||||
}
|
||||
|
||||
|
|
|
@ -1568,7 +1568,7 @@ QRegion QTransform::map(const QRegion &r) const
|
|||
}
|
||||
|
||||
QPainterPath p = map(qt_regionToPath(r));
|
||||
return p.toFillPolygon(QTransform()).toPolygon();
|
||||
return p.toFillPolygon().toPolygon();
|
||||
}
|
||||
|
||||
struct QHomogeneousCoordinate
|
||||
|
|
Loading…
Reference in New Issue