From 3317c5b1f35e450e3588dbda8e656f802676a12b Mon Sep 17 00:00:00 2001 From: wuyuesong <1377030423@qq.com> Date: Sun, 27 Oct 2024 23:38:48 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=9B=B4=E6=94=B9=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E4=B8=AD=E7=9A=84paintEvent=E5=87=BD=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E5=BE=97=E7=AA=97=E5=8F=A3=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E4=BE=A7=E8=BE=B9=E6=A0=8F=E6=A8=A1=E5=BC=8F=E7=9A=84?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E4=B8=8D=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/share/aiassistant/preGuidWidget.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr/share/aiassistant/preGuidWidget.py b/usr/share/aiassistant/preGuidWidget.py index f3f37b05..6321809b 100644 --- a/usr/share/aiassistant/preGuidWidget.py +++ b/usr/share/aiassistant/preGuidWidget.py @@ -132,8 +132,14 @@ class OptionWidget(QWidget): painter.setOpacity(0.80) painter.setRenderHint(QPainter.Antialiasing) # 设置抗锯齿,让圆角更加平滑 # # 定义画笔和填充 - painter.setBrush(QBrush(QColor(235,235,235))) # 画刷颜色设置为白色 - painter.setPen(QPen(QColor(235, 235, 235), 0)) # 画笔颜色和粗细 + if PublicTypes.viewType == "sidebar": + painter.setBrush(QBrush(QColor(235,235,235))) # 画刷颜色设置为白色 + painter.setPen(QPen(QColor(235, 235, 235), 0)) # 画笔颜色和粗细 + elif PublicTypes.viewType == "windows": + painter.setBrush(QBrush(QColor(255,255,255))) # 画刷颜色设置为白色 + painter.setPen(QPen(QColor(255, 255, 255), 0)) # 画笔颜色和粗细 + else: + raise NotImplementedError("illegal type") # # 绘制圆角矩形 painter.drawRoundedRect(self.rect(), 10, 10) # 设置边角为10像素的圆度 -- Gitee