parent
3ffc8fd681
commit
fc1566897f
|
@ -36,12 +36,7 @@ int main(int argc, char *argv[])
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
#if 0
|
|
||||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
|
|
||||||
Qt::HighDpiScaleFactorRoundingPolicy::Round);
|
|
||||||
#else
|
|
||||||
// Don't round the scale factor.
|
// Don't round the scale factor.
|
||||||
// This will break QWidget applications because they can't render correctly.
|
// This will break QWidget applications because they can't render correctly.
|
||||||
// Qt Quick applications won't have this issue.
|
// Qt Quick applications won't have this issue.
|
||||||
|
|
|
@ -93,12 +93,7 @@ int main(int argc, char *argv[])
|
||||||
// they are still useful on other platforms).
|
// they are still useful on other platforms).
|
||||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||||
#endif
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
#if 0
|
|
||||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
|
|
||||||
Qt::HighDpiScaleFactorRoundingPolicy::Round);
|
|
||||||
#else
|
|
||||||
// Don't round the scale factor.
|
// Don't round the scale factor.
|
||||||
// This will break QWidget applications because they can't render correctly.
|
// This will break QWidget applications because they can't render correctly.
|
||||||
// Qt Quick applications won't have this issue.
|
// Qt Quick applications won't have this issue.
|
||||||
|
|
|
@ -1084,7 +1084,7 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType,
|
||||||
} else if (!m_framelessWindows.contains(msg->hwnd)) {
|
} else if (!m_framelessWindows.contains(msg->hwnd)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto data = reinterpret_cast<WINDOW *>(
|
const auto data = reinterpret_cast<WINDOWDATA *>(
|
||||||
WNEF_EXECUTE_WINAPI_RETURN(GetWindowLongPtrW, 0, msg->hwnd, GWLP_USERDATA));
|
WNEF_EXECUTE_WINAPI_RETURN(GetWindowLongPtrW, 0, msg->hwnd, GWLP_USERDATA));
|
||||||
if (!data) {
|
if (!data) {
|
||||||
// Work-around a long existing Windows bug.
|
// Work-around a long existing Windows bug.
|
||||||
|
|
|
@ -48,7 +48,7 @@ class FRAMELESSHELPER_EXPORT WinNativeEventFilter : public QAbstractNativeEventF
|
||||||
Q_DISABLE_COPY_MOVE(WinNativeEventFilter)
|
Q_DISABLE_COPY_MOVE(WinNativeEventFilter)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using WINDOW = struct _WINDOW
|
using WINDOWDATA = struct _WINDOWDATA
|
||||||
{
|
{
|
||||||
bool initialized = false, fixedSize = false, mouseTransparent = false,
|
bool initialized = false, fixedSize = false, mouseTransparent = false,
|
||||||
restoreDefaultWindowStyle = false, enableLayeredWindow = false,
|
restoreDefaultWindowStyle = false, enableLayeredWindow = false,
|
||||||
|
@ -58,7 +58,6 @@ public:
|
||||||
QList<QPointer<QObject>> ignoreObjects = {}, draggableObjects = {};
|
QList<QPointer<QObject>> ignoreObjects = {}, draggableObjects = {};
|
||||||
QSize maximumSize = {}, minimumSize = {};
|
QSize maximumSize = {}, minimumSize = {};
|
||||||
};
|
};
|
||||||
using WINDOWDATA = WINDOW;
|
|
||||||
|
|
||||||
enum class SystemMetric { BorderWidth, BorderHeight, TitleBarHeight };
|
enum class SystemMetric { BorderWidth, BorderHeight, TitleBarHeight };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue