mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-27 16:38:06 +08:00
高级打包器支持小字
This commit is contained in:
parent
34a5ae629e
commit
fd36c84d74
@ -2059,7 +2059,14 @@ def LockBottleName():
|
|||||||
def get_now_lang()->"获取当前语言":
|
def get_now_lang()->"获取当前语言":
|
||||||
return os.getenv('LANG')
|
return os.getenv('LANG')
|
||||||
|
|
||||||
|
def SetFont(size):
|
||||||
|
font = QtGui.QFont(defaultFont)
|
||||||
|
if size == 1:
|
||||||
|
window.setFont(defaultFont)
|
||||||
|
return
|
||||||
|
font.setPixelSize(int(defaultFont.pixelSize() / size))
|
||||||
|
font.setPointSize(int(defaultFont.pointSize() / size))
|
||||||
|
window.setFont(font)
|
||||||
|
|
||||||
|
|
||||||
bottleNameLock = False
|
bottleNameLock = False
|
||||||
@ -2119,6 +2126,11 @@ 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()
|
||||||
|
#hScroll = QtWidgets.QScrollArea()
|
||||||
|
#hScroll.setWidget(widget)
|
||||||
|
#hScroll.verticalScrollBar().setValue(hScroll.verticalScrollBar().maximum())
|
||||||
|
#hScroll.horizontalScrollBar().setValue(hScroll.horizontalScrollBar().maximum())
|
||||||
widgetLayout = QtWidgets.QGridLayout()
|
widgetLayout = QtWidgets.QGridLayout()
|
||||||
# 设置变量以修改和获取值项
|
# 设置变量以修改和获取值项
|
||||||
wineVersion = QtWidgets.QComboBox()
|
wineVersion = QtWidgets.QComboBox()
|
||||||
@ -2293,6 +2305,8 @@ programmenu = menu.addMenu(transla.transe("U", "程序"))
|
|||||||
debMenu = menu.addMenu(transla.transe("U", "deb 包"))
|
debMenu = menu.addMenu(transla.transe("U", "deb 包"))
|
||||||
uploadSparkStore = menu.addMenu(transla.transe("U", "投稿到星火应用商店"))
|
uploadSparkStore = menu.addMenu(transla.transe("U", "投稿到星火应用商店"))
|
||||||
help = menu.addMenu(transla.transe("U", "帮助"))
|
help = menu.addMenu(transla.transe("U", "帮助"))
|
||||||
|
setMiniFont = QtWidgets.QAction(transla.transe("U", "使用小字体"))
|
||||||
|
setDefaultFont = QtWidgets.QAction(transla.transe("U", "使用默认大小字体"))
|
||||||
exit = QtWidgets.QAction(transla.transe("U", "退出程序"))
|
exit = QtWidgets.QAction(transla.transe("U", "退出程序"))
|
||||||
debE = QtWidgets.QAction(transla.transe("U", "只读取 Control 信息"))
|
debE = QtWidgets.QAction(transla.transe("U", "只读取 Control 信息"))
|
||||||
debX = QtWidgets.QAction(transla.transe("U", "读取所有(需解包,时间较久)"))
|
debX = QtWidgets.QAction(transla.transe("U", "读取所有(需解包,时间较久)"))
|
||||||
@ -2304,8 +2318,13 @@ else:
|
|||||||
uploadSparkStoreProgram.setDisabled(True)
|
uploadSparkStoreProgram.setDisabled(True)
|
||||||
tip = QtWidgets.QAction(transla.transe("U", "小提示"))
|
tip = QtWidgets.QAction(transla.transe("U", "小提示"))
|
||||||
getPdfHelp = QtWidgets.QAction(transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用)\nBy @雁舞白沙"))
|
getPdfHelp = QtWidgets.QAction(transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程(小白专用)\nBy @雁舞白沙"))
|
||||||
|
setMiniFont.triggered.connect(lambda: SetFont(1.2))
|
||||||
|
setDefaultFont.triggered.connect(lambda: SetFont(1))
|
||||||
exit.triggered.connect(window.close)
|
exit.triggered.connect(window.close)
|
||||||
tip.triggered.connect(helps)
|
tip.triggered.connect(helps)
|
||||||
|
programmenu.addAction(setMiniFont)
|
||||||
|
programmenu.addAction(setDefaultFont)
|
||||||
|
programmenu.addSeparator()
|
||||||
programmenu.addAction(exit)
|
programmenu.addAction(exit)
|
||||||
debMenu.addAction(debE)
|
debMenu.addAction(debE)
|
||||||
debMenu.addAction(debX)
|
debMenu.addAction(debX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user