新增拖动条

This commit is contained in:
gfdgd xi 2024-06-29 12:04:46 +08:00
parent 535232ac5f
commit 380cf74bbf
3 changed files with 23 additions and 6 deletions

View File

@ -27,9 +27,9 @@ def readtxt(path):
return str # 返回结果 return str # 返回结果
fontSize = 1 fontSize = 1
tempSys = QtWidgets.QApplication(sys.argv) '''tempSys = QtWidgets.QApplication(sys.argv)
if tempSys.primaryScreen().availableGeometry().size().width() < 1366 or tempSys.primaryScreen().availableGeometry().size().height() < 768: if tempSys.primaryScreen().availableGeometry().size().width() < 1366 or tempSys.primaryScreen().availableGeometry().size().height() < 768:
fontSize = 1.1 fontSize = 1.1'''
defultProgramList = { defultProgramList = {
"Architecture": "Auto", "Architecture": "Auto",

View File

@ -2348,6 +2348,7 @@ tips = transla.transe("U", """提示:
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
widget = QtWidgets.QWidget() widget = QtWidgets.QWidget()
defaultFont = window.font() defaultFont = window.font()
#hScroll = QtWidgets.QScrollArea() #hScroll = QtWidgets.QScrollArea()
#hScroll.setWidget(widget) #hScroll.setWidget(widget)
@ -2605,7 +2606,6 @@ cleanBottonByUOS.setChecked(True)
chooseWineHelperValue.setChecked(True) chooseWineHelperValue.setChecked(True)
e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_all.deb") e12_text.setText(f"{get_desktop_path()}/demo_1.0.0_all.deb")
widget.setLayout(widgetLayout) widget.setLayout(widgetLayout)
window.setCentralWidget(widget)
window.setWindowTitle(f"wine 应用打包器 {version}") window.setWindowTitle(f"wine 应用打包器 {version}")
window.setWindowIcon(QtGui.QIcon(iconPath)) window.setWindowIcon(QtGui.QIcon(iconPath))
window.resize(int(window.frameSize().width() * 2.1), int(window.frameSize().height())) window.resize(int(window.frameSize().width() * 2.1), int(window.frameSize().height()))
@ -2678,6 +2678,16 @@ allInfoList = {
# 设置字体 # 设置字体
SetFont(app) SetFont(app)
#window.setWindowFlag(QtGui.Qt) #window.setWindowFlag(QtGui.Qt)
# 设置滚动条
areaScroll = QtWidgets.QScrollArea(window)
areaScroll.setWidgetResizable(True)
areaScroll.setWidget(widget)
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
window.setCentralWidget(areaScroll)
window.resize(int(app.primaryScreen().availableGeometry().size().width() * 0.9), int(app.primaryScreen().availableGeometry().size().height() * 0.9))
window.show() window.show()
sys.exit(app.exec_()) sys.exit(app.exec_())
# Flag解包只读control和解包全部读取 # Flag解包只读control和解包全部读取

View File

@ -2474,7 +2474,7 @@ updateThingsString = QtCore.QCoreApplication.translate("U", '''※1、精简冗
3Wine 打包器不允许版本号开头输入首字母以及版本号不允许出现空格 3Wine 打包器不允许版本号开头输入首字母以及版本号不允许出现空格
4Wine 打包器生成的 deb 同时支持使用 spark-dwine-helper deepin-wine-helper 4Wine 打包器生成的 deb 同时支持使用 spark-dwine-helper deepin-wine-helper
5支持调用拓展 Qemu 5支持调用拓展 Qemu
6优化小屏幕使用体验''') 6新增滚动条优化小屏幕使用体验''')
for i in information["Thank"]: for i in information["Thank"]:
thankText += f"{i}\n" thankText += f"{i}\n"
updateTime = "2024年06月29日" updateTime = "2024年06月29日"
@ -2747,8 +2747,6 @@ mainLayout.setColumnStretch(0, 2)
mainLayout.setColumnStretch(1, 1) mainLayout.setColumnStretch(1, 1)
mainLayout.addWidget(returnText, 0, 1, 2, 1) mainLayout.addWidget(returnText, 0, 1, 2, 1)
window.setStyleSheet("""word-wrap: break-word;""")
# 版权 # 版权
if offLineInformation.replace("\n", "").replace(" ", "") == "": if offLineInformation.replace("\n", "").replace(" ", "") == "":
copy = QtWidgets.QLabel(f"""程序版本:{version}<b>提示Wine 无法保证可以运行所有的 Windows 程序,如果想要运行更多 Windows 程序,可以考虑虚拟机和双系统</b><br/> copy = QtWidgets.QLabel(f"""程序版本:{version}<b>提示Wine 无法保证可以运行所有的 Windows 程序,如果想要运行更多 Windows 程序,可以考虑虚拟机和双系统</b><br/>
@ -3334,6 +3332,15 @@ if o1.currentText() == "":
o1.addItem("没有识别到任何Wine请在菜单栏“程序”安装Wine或安装任意Wine应用") o1.addItem("没有识别到任何Wine请在菜单栏“程序”安装Wine或安装任意Wine应用")
SetFont(setting["FontSize"]) SetFont(setting["FontSize"])
# 设置滚动条
areaScroll = QtWidgets.QScrollArea(window)
areaScroll.setWidgetResizable(True)
areaScroll.setWidget(widget)
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
window.setCentralWidget(areaScroll)
window.resize(int(app.primaryScreen().availableGeometry().size().width() * 0.9), int(app.primaryScreen().availableGeometry().size().height() * 0.9))
# Mini 模式 # Mini 模式
# MiniMode(True) # MiniMode(True)
sys.exit(app.exec_()) sys.exit(app.exec_())