From 5ee113e2c4f916b1078ace782bb130f5edf64bcf Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: ćšć, 14 12æ 2023 20:28:02 +0800 Subject: [PATCH] minor tweaks --- src/quick/quickwindowagent_win.cpp | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/quick/quickwindowagent_win.cpp b/src/quick/quickwindowagent_win.cpp index 15418e2..cfc3eb1 100644 --- a/src/quick/quickwindowagent_win.cpp +++ b/src/quick/quickwindowagent_win.cpp @@ -31,8 +31,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 +42,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 +83,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: @@ -122,4 +121,4 @@ } -#include "quickwindowagent_win.moc" \ No newline at end of file +#include "quickwindowagent_win.moc" -- Gitblit v1.9.1