From 81ee93a7e6fc0092d49ea7db0c4f1c2694e89fd4 Mon Sep 17 00:00:00 2001 From: lixueman Date: Wed, 12 Oct 2022 11:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B4=E5=BD=B1=E4=B8=8D=E5=8F=97=E7=AA=97?= =?UTF-8?q?=E4=BD=93=E9=80=8F=E6=98=8E=E5=BA=A6=E5=BD=B1=E5=93=8D=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=87=8D=E5=8F=A0=E5=AE=9E=E7=8E=B0=E6=8F=8F?= =?UTF-8?q?=E8=BE=B9=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UserInterface/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp index bd977a5..3db9b42 100755 --- a/src/UserInterface/mainwindow.cpp +++ b/src/UserInterface/mainwindow.cpp @@ -685,15 +685,19 @@ void MainWindow::paintEvent(QPaintEvent *event) painter.setPen(Qt::transparent); painter.setOpacity(transparency); painter.drawPath(path); + painter.restore(); KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); QColor color = Qt::black; - for (int i = 0; i < 6; i++) { + painter.save(); + for (int i = 0; i < 7; i++) { rect = this->rect().adjusted(i, i, - i, - i); color.setAlpha(i * 6); painter.setBrush(Qt::NoBrush); painter.setPen(QPen(color, 1)); painter.drawRoundedRect(rect, 10, 10); } + painter.restore(); + QMainWindow::paintEvent(event); } /** * 鼠标点击窗口外部事件