修改关于页面

This commit is contained in:
shuaikangzhou 2023-12-24 20:07:18 +08:00
parent feff156c6d
commit d37f75da00
6 changed files with 7663 additions and 5613 deletions

View File

@ -12,7 +12,7 @@ description = [
]
about = f'''
版本{version}<br>
QQ交流群:{contact},对项目有贡献即可入群具体要求请阅读文档<br>
QQ交流群:请关注微信公众号回复联系方式<br>
地址<a href='{github}'>{github}</a><br>
官网<a href='{website}'>{website}</a><br>
新特性:<br>{''.join(['' + i for i in description])}<br>

View File

@ -36,6 +36,7 @@
<file>icons/Cursors/5.png</file>
<file>icons/Cursors/6.png</file>
<file>icons/Cursors/7.png</file>
<file>icons/weixin.png</file>
</qresource>
<qresource prefix="/data">

File diff suppressed because it is too large Load Diff

40
app/ui/about_dialog.py Normal file
View File

@ -0,0 +1,40 @@
from PyQt5.QtCore import QSize
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QApplication, QDialog
try:
from .dialog import Ui_Dialog
from app import config
from app.resources import resource_rc
except:
from dialog import Ui_Dialog
from ..resources import resource_rc
class AboutDialog(QDialog, Ui_Dialog):
def __init__(self, parent=None):
super(AboutDialog, self).__init__(parent)
self.setupUi(self)
self.setWindowTitle('关于')
self.resize(QSize(640,520))
self.init_ui()
def init_ui(self):
pixmap = QPixmap(':/icons/icons/logo99.png')
self.label_logo.setPixmap(pixmap)
pixmap = QPixmap(':/icons/icons/weixin.png')
self.label_weixin.setPixmap(pixmap)
self.label_version.setText('《留痕》')
self.textBrowser.setHtml(config.about)
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
dialog = AboutDialog()
result = dialog.exec_() # 使用exec_()获取用户的操作结果
if result == QDialog.Accepted:
print("用户点击了导出按钮")
else:
print("用户点击了取消按钮")
sys.exit(app.exec_())

61
app/ui/dialog.py Normal file
View File

@ -0,0 +1,61 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(553, 394)
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.label_version = QtWidgets.QLabel(Dialog)
self.label_version.setLayoutDirection(QtCore.Qt.LeftToRight)
self.label_version.setAlignment(QtCore.Qt.AlignCenter)
self.label_version.setObjectName("label_version")
self.verticalLayout.addWidget(self.label_version)
self.label_logo = QtWidgets.QLabel(Dialog)
self.label_logo.setMinimumSize(QtCore.QSize(100, 100))
self.label_logo.setObjectName("label_logo")
self.verticalLayout.addWidget(self.label_logo)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.horizontalLayout.addLayout(self.verticalLayout)
self.textBrowser = QtWidgets.QTextBrowser(Dialog)
self.textBrowser.setFrameShape(QtWidgets.QFrame.NoFrame)
self.textBrowser.setObjectName("textBrowser")
self.horizontalLayout.addWidget(self.textBrowser)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.label_weixin = QtWidgets.QLabel(Dialog)
self.label_weixin.setAlignment(QtCore.Qt.AlignCenter)
self.label_weixin.setObjectName("label_weixin")
self.verticalLayout_2.addWidget(self.label_weixin)
self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout_2.addWidget(self.buttonBox)
self.retranslateUi(Dialog)
self.buttonBox.accepted.connect(Dialog.accept) # type: ignore
self.buttonBox.rejected.connect(Dialog.reject) # type: ignore
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label_version.setText(_translate("Dialog", "TextLabel"))
self.label_logo.setText(_translate("Dialog", "logo"))
self.label_weixin.setText(_translate("Dialog", "TextLabel"))

View File

@ -18,6 +18,7 @@ from app import config
from app.DataBase import msg_db, misc_db, micro_msg_db, hard_link_db, close_db
from app.ui.Icon import Icon
from . import mainwindow
from .about_dialog import AboutDialog
from .chat import ChatWindow
from .contact import ContactWindow
from .tool.tool_window import ToolWindow
@ -233,7 +234,9 @@ class MainWinController(QMainWindow, mainwindow.Ui_MainWindow,QCursorGif):
"""
关于
"""
QMessageBox.about(self, "关于",config.about)
# QMessageBox.about(self, "关于",config.about)
about_view = AboutDialog(self)
about_view.show()
def decrypt_success(self):
QMessageBox.about(self, "解密成功", "请重新启动")