From 59207cbc449e2e69e6b794115f8aeae168dba405 Mon Sep 17 00:00:00 2001
From: Zhao Yuhang <2546789017@qq.com>
Date: 周三, 13 12月 2023 20:08:19 +0800
Subject: [PATCH] minor tweaks

---
 src/widgets/widgetwindowagent.cpp |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/widgets/widgetwindowagent.cpp b/src/widgets/widgetwindowagent.cpp
index f7d016e..ff76aef 100644
--- a/src/widgets/widgetwindowagent.cpp
+++ b/src/widgets/widgetwindowagent.cpp
@@ -1,6 +1,10 @@
 #include "widgetwindowagent.h"
 #include "widgetwindowagent_p.h"
 
+#include <QtGui/QtEvents>
+#include <QtGui/QPainter>
+#include <QtCore/QDebug>
+
 #include "widgetitemdelegate_p.h"
 
 namespace QWK {
@@ -39,15 +43,19 @@
             return false;
         }
         d->hostWidget = w;
+
+#ifdef Q_OS_WINDOWS
+        d->setupWindows10BorderWorkaround();
+#endif
         return true;
     }
 
-    const QWidget *WidgetWindowAgent::titleBar() const {
+    QWidget *WidgetWindowAgent::titleBar() const {
         Q_D(const WidgetWindowAgent);
-        return static_cast<const QWidget *>(d->context->titleBar());
+        return static_cast<QWidget *>(d->context->titleBar());
     }
 
-    void WidgetWindowAgent::setTitleBar(const QWidget *w) {
+    void WidgetWindowAgent::setTitleBar(QWidget *w) {
         Q_D(WidgetWindowAgent);
         if (!d->context->setTitleBar(w)) {
             return;
@@ -55,12 +63,12 @@
         Q_EMIT titleBarWidgetChanged(w);
     }
 
-    const QWidget *WidgetWindowAgent::systemButton(SystemButton button) const {
+    QWidget *WidgetWindowAgent::systemButton(SystemButton button) const {
         Q_D(const WidgetWindowAgent);
-        return static_cast<const QWidget *>(d->context->systemButton(button));
+        return static_cast<QWidget *>(d->context->systemButton(button));
     }
 
-    void WidgetWindowAgent::setSystemButton(SystemButton button, const QWidget *w) {
+    void WidgetWindowAgent::setSystemButton(SystemButton button, QWidget *w) {
         Q_D(WidgetWindowAgent);
         if (!d->context->setSystemButton(button, w)) {
             return;

--
Gitblit v1.9.1