[patch] 设计PDD的处理消息架构为msg_type 通用模式 处理PDD支持图片类型和 商品卡片类型的消息的发送回复 修改GUI托盘内部样式
This commit is contained in:
10
main.py
10
main.py
@@ -82,7 +82,7 @@ class LoginWindow(QMainWindow):
|
||||
|
||||
def initUI(self):
|
||||
# 设置窗口基本属性
|
||||
self.setWindowTitle(f'AI客服智能助手 v{config.APP_VERSION}')
|
||||
self.setWindowTitle(f'水滴AI客服智能助手 v{config.APP_VERSION}')
|
||||
# 只设置宽度,高度自适应内容
|
||||
self.setFixedWidth(450) # 固定宽度
|
||||
# 不设置固定高度,让窗口根据内容自适应
|
||||
@@ -101,7 +101,7 @@ class LoginWindow(QMainWindow):
|
||||
central_widget.setLayout(main_layout)
|
||||
|
||||
# 添加标题和副标题
|
||||
title_label = QLabel('AI客服智能助手')
|
||||
title_label = QLabel('水滴AI客服智能助手')
|
||||
title_label.setObjectName("title")
|
||||
title_label.setAlignment(Qt.AlignCenter)
|
||||
title_label.setFont(QFont('Microsoft YaHei', 16, QFont.Bold)) # 稍微减小字体
|
||||
@@ -867,7 +867,7 @@ class LoginWindow(QMainWindow):
|
||||
self.tray_icon.setContextMenu(self.tray_menu)
|
||||
|
||||
# 设置托盘提示
|
||||
self.tray_icon.setToolTip("AI客服智能助手")
|
||||
self.tray_icon.setToolTip("水滴AI客服智能助手")
|
||||
|
||||
# 双击托盘图标显示窗口
|
||||
self.tray_icon.activated.connect(self.tray_icon_activated)
|
||||
@@ -888,7 +888,7 @@ class LoginWindow(QMainWindow):
|
||||
|
||||
# 1. 显示后端连接状态
|
||||
if ws_manager and ws_manager.backend_client and ws_manager.backend_client.is_connected:
|
||||
backend_status = QAction("✅ 后端已连接", self)
|
||||
backend_status = QAction("✅ AI服务已连接", self)
|
||||
backend_status.setEnabled(False) # 不可点击
|
||||
self.tray_menu.addAction(backend_status)
|
||||
|
||||
@@ -1113,7 +1113,7 @@ class LoginWindow(QMainWindow):
|
||||
# 首次最小化时显示提示消息
|
||||
if not hasattr(self, '_tray_message_shown'):
|
||||
self.tray_icon.showMessage(
|
||||
"AI客服智能助手",
|
||||
"水滴AI客服智能助手",
|
||||
"程序已最小化到系统托盘。双击托盘图标可重新显示窗口。",
|
||||
QSystemTrayIcon.Information,
|
||||
3000
|
||||
|
||||
Reference in New Issue
Block a user