From 5e12d4d4f27e4ce27a8c9e6145bc6e45840e00f2 Mon Sep 17 00:00:00 2001 From: Sine Striker <trueful@163.com> Date: 周日, 17 12月 2023 15:11:48 +0800 Subject: [PATCH] Add qmake and msbuild config files --- src/quick/quickwindowagent_win.cpp | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/quick/quickwindowagent_win.cpp b/src/quick/quickwindowagent_win.cpp index 15418e2..0d7fe92 100644 --- a/src/quick/quickwindowagent_win.cpp +++ b/src/quick/quickwindowagent_win.cpp @@ -8,7 +8,6 @@ namespace QWK { class BorderItem : public QQuickPaintedItem, public NativeEventFilter { - Q_OBJECT public: explicit BorderItem(QQuickItem *parent, AbstractWindowContext *context); ~BorderItem() override; @@ -31,8 +30,7 @@ BorderItem::BorderItem(QQuickItem *parent, AbstractWindowContext *context) : QQuickPaintedItem(parent), context(context) { - setAntialiasing(true); // ### FIXME: do we need to enable or disable this? - setMipmap(true); // ### FIXME: do we need to enable or disable this? + setAntialiasing(true); // We needs anti-aliasing to give us better result. setFillColor({}); // Will improve the performance a little bit. setOpaquePainting(true); // Will also improve the performance, we don't draw // semi-transparent borders of course. @@ -43,7 +41,7 @@ anchors->setLeft(parentPri->left()); anchors->setRight(parentPri->right()); - setZ(10); + setZ(9999); // Make sure our fake border always above everything in the window. context->installNativeEventFilter(this); connect(window(), &QQuickWindow::activeChanged, this, @@ -84,7 +82,7 @@ bool BorderItem::nativeEventFilter(const QByteArray &eventType, void *message, QT_NATIVE_EVENT_RESULT_TYPE *result) { Q_UNUSED(eventType) - auto msg = reinterpret_cast<const MSG *>(message); + const auto msg = static_cast<const MSG *>(message); switch (msg->message) { case WM_THEMECHANGED: case WM_SYSCOLORCHANGE: @@ -121,5 +119,3 @@ } } - -#include "quickwindowagent_win.moc" \ No newline at end of file -- Gitblit v1.9.1