From 8e7470999f6f4f1c662d42191145e2f188ec0e12 Mon Sep 17 00:00:00 2001 From: wuyuesong <1377030423@qq.com> Date: Sun, 27 Oct 2024 23:26:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?chore=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=8F=98=E9=87=8F=E6=9D=A5=E6=8C=87=E6=98=8E=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=A8=A1=E5=BC=8F=E7=9A=84=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/share/aiassistant/PublicTypes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr/share/aiassistant/PublicTypes.py b/usr/share/aiassistant/PublicTypes.py index 2b6129b..56df0ab 100644 --- a/usr/share/aiassistant/PublicTypes.py +++ b/usr/share/aiassistant/PublicTypes.py @@ -4,5 +4,9 @@ class PublicTypes: def __init__(self): self.mainwin_width = 480 self.mainwin_height = 1150 - + + self.mainwin_windows_width = 1200 + self.mainwin_windows_height = 600 + + \ No newline at end of file -- Gitee From 10843d9c3d985cc491d9e012e4fa46d586e58052 Mon Sep 17 00:00:00 2001 From: wuyuesong <1377030423@qq.com> Date: Sun, 27 Oct 2024 23:34:12 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore=EF=BC=9A=20=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E4=B8=8D=E5=86=8D=E5=9B=BA=E5=AE=9A=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/share/aiassistant/bubble_message.py | 4 ++-- usr/share/aiassistant/preGuidWidget.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/share/aiassistant/bubble_message.py b/usr/share/aiassistant/bubble_message.py index fba27a4..3a27cbd 100644 --- a/usr/share/aiassistant/bubble_message.py +++ b/usr/share/aiassistant/bubble_message.py @@ -326,7 +326,7 @@ class ChatWidget(QWidget): print(self.width) h = self.height - 280 - self.setFixedHeight(h) + # self.setFixedHeight(h) layout = QVBoxLayout() layout.setSpacing(0) self.adjustSize() @@ -441,7 +441,7 @@ class MeetingWidget(QWidget): print(self.width) h = self.height - 280 - self.setFixedHeight(h) + # self.setFixedHeight(h) layout = QVBoxLayout() layout.setSpacing(0) self.adjustSize() diff --git a/usr/share/aiassistant/preGuidWidget.py b/usr/share/aiassistant/preGuidWidget.py index 6122324..1a04d41 100644 --- a/usr/share/aiassistant/preGuidWidget.py +++ b/usr/share/aiassistant/preGuidWidget.py @@ -42,7 +42,7 @@ class PreWidget(QWidget): self.screenRect = self.desktop.screenGeometry() self.height = self.screenRect.height() h = self.height - 380 - self.setFixedHeight(h) + # self.setFixedHeight(h) # self.setWindowFlags(Qt.FramelessWindowHint) @@ -102,7 +102,7 @@ class OptionWidget(QWidget): class Ui_optWgt(object): def setupUi(self, optWgt): # optWgt.resize(492, 108) - optWgt.setMinimumSize(QtCore.QSize(360, 108)) + # optWgt.setMinimumSize(QtCore.QSize(360, 108)) self.horizontalLayout = QtWidgets.QHBoxLayout(optWgt) self.horizontalLayout.setContentsMargins(24, 10, 24, 18) self.horizontalLayout.setObjectName("horizontalLayout") -- Gitee From f4a8b58974e4c54393a672113ca336c44f423dd9 Mon Sep 17 00:00:00 2001 From: wuyuesong <1377030423@qq.com> Date: Sun, 27 Oct 2024 23:37:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E5=9C=A8=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E5=87=BD=E6=95=B0=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E5=BE=97=E9=A6=96=E9=A1=B5=E5=8F=AF=E4=BB=A5=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=A8=A1=E5=BC=8F=E5=92=8C=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/share/aiassistant/preGuidWidget.py | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/usr/share/aiassistant/preGuidWidget.py b/usr/share/aiassistant/preGuidWidget.py index 1a04d41..f3f37b0 100644 --- a/usr/share/aiassistant/preGuidWidget.py +++ b/usr/share/aiassistant/preGuidWidget.py @@ -13,6 +13,9 @@ from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * from bubble_message import BubbleMessage,MessageType +from PublicTypes import PublicTypes + +public_types = PublicTypes() class ModelType: Chat = 1 @@ -70,6 +73,42 @@ class PreWidget(QWidget): self.chatGuidWgt.clicked.connect(self.chat_model_signal) self.paintGuidWgt.clicked.connect(self.paint_model_signal) self.meetingMinutsGuidWgt.clicked.connect(self.meeting_minuts_model_signal) + + + def switchViewType(self): + if PublicTypes.viewType == "sidebar": + self.verticalLayout.setSpacing(10) + + self.chatGuidWgt.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) + self.paintGuidWgt.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) + self.meetingMinutsGuidWgt.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) + self.guid_title.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Ignored) + self.guid_content.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Ignored) + + self.verticalLayout.setAlignment(self.chatGuidWgt,Qt.AlignLeft) + self.verticalLayout.setAlignment(self.paintGuidWgt,Qt.AlignLeft) + self.verticalLayout.setAlignment(self.meetingMinutsGuidWgt,Qt.AlignLeft) + self.verticalLayout.setAlignment(self.guid_title,Qt.AlignLeft) + self.verticalLayout.setAlignment(self.guid_content,Qt.AlignLeft) + + + elif PublicTypes.viewType == "windows": + self.verticalLayout.setSpacing(15) + self.chatGuidWgt.setFixedWidth(440) + self.paintGuidWgt.setFixedWidth(440) + self.meetingMinutsGuidWgt.setFixedWidth(440) + self.guid_title.setFixedWidth(440) + self.guid_content.setFixedSize(440, 120) + + self.verticalLayout.setAlignment(self.chatGuidWgt,Qt.AlignCenter) + self.verticalLayout.setAlignment(self.paintGuidWgt,Qt.AlignCenter) + self.verticalLayout.setAlignment(self.meetingMinutsGuidWgt,Qt.AlignCenter) + self.verticalLayout.setAlignment(self.guid_title,Qt.AlignCenter) + self.verticalLayout.setAlignment(self.guid_content,Qt.AlignCenter) + + else: + raise NotImplementedError("illegal type") + class OptionWidget(QWidget): clicked = pyqtSignal() -- Gitee