This commit is contained in:
恍兮惚兮 2024-11-25 00:27:40 +08:00
parent 6470f82f91
commit 731056c8a1
2 changed files with 11 additions and 60 deletions

View File

@ -807,12 +807,20 @@ class dialog_setting_game_internal(QWidget):
table = TableViewW()
table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
table.setModel(model)
table.horizontalHeader().setSectionResizeMode(
2, QHeaderView.ResizeMode.ResizeToContents
)
table.horizontalHeader().setSectionResizeMode(
1, QHeaderView.ResizeMode.ResizeToContents
)
table.horizontalHeader().setSectionResizeMode(
0, QHeaderView.ResizeMode.Stretch
)
table.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection))
table.setWordWrap(False)
table.setModel(model)
table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
table.customContextMenuRequested.connect(self.__privatetextproc_showmenu)
@ -876,7 +884,7 @@ class dialog_setting_game_internal(QWidget):
self.__textprocinternalmodel.insertRow(
row,
[
QStandardItem(postprocessconfig[_internal]["name"]),
QStandardItem(_TR(postprocessconfig[_internal]["name"])),
QStandardItem(),
QStandardItem(),
],

View File

@ -429,63 +429,6 @@ def filetranslate(self):
"group",
),
],
[
(
dict(
title="LiveCaptions",
type="grid",
grid=[
[
"开始",
D_getsimpleswitch(
globalconfig["sourcestatus2"]["livecaptions"],
"use",
name="livecaptions",
parent=self,
callback=functools.partial(
yuitsu_switch,
self,
globalconfig["sourcestatus2"],
"sourceswitchs",
"livecaptions",
gobject.baseobject.starttextsource,
),
pair="sourceswitchs",
),
],
[
"截取行数",
D_getspinbox(
1,
10,
globalconfig,
"livecaptions_cachesentence",
),
],
[
"刷新延迟_(ms)",
D_getspinbox(
10,
100000,
globalconfig,
"livecaptions_delay",
),
],
[
"最长等待时间_(ms)",
D_getspinbox(
10,
100000,
globalconfig,
"livecaptions_maxwait",
),
],
],
),
0,
"group",
),
],
]
return grids