mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
.
This commit is contained in:
parent
6470f82f91
commit
731056c8a1
@ -807,12 +807,20 @@ class dialog_setting_game_internal(QWidget):
|
|||||||
|
|
||||||
table = TableViewW()
|
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.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
||||||
table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
|
table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
|
||||||
table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection))
|
table.setSelectionMode((QAbstractItemView.SelectionMode.SingleSelection))
|
||||||
table.setWordWrap(False)
|
table.setWordWrap(False)
|
||||||
table.setModel(model)
|
|
||||||
|
|
||||||
table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
|
table.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu)
|
||||||
table.customContextMenuRequested.connect(self.__privatetextproc_showmenu)
|
table.customContextMenuRequested.connect(self.__privatetextproc_showmenu)
|
||||||
@ -876,7 +884,7 @@ class dialog_setting_game_internal(QWidget):
|
|||||||
self.__textprocinternalmodel.insertRow(
|
self.__textprocinternalmodel.insertRow(
|
||||||
row,
|
row,
|
||||||
[
|
[
|
||||||
QStandardItem(postprocessconfig[_internal]["name"]),
|
QStandardItem(_TR(postprocessconfig[_internal]["name"])),
|
||||||
QStandardItem(),
|
QStandardItem(),
|
||||||
QStandardItem(),
|
QStandardItem(),
|
||||||
],
|
],
|
||||||
|
@ -429,63 +429,6 @@ def filetranslate(self):
|
|||||||
"group",
|
"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
|
return grids
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user