diff --git a/py/LunaTranslator/gui/dialog_savedgame_setting.py b/py/LunaTranslator/gui/dialog_savedgame_setting.py index d61f5cc6..cddd59a3 100644 --- a/py/LunaTranslator/gui/dialog_savedgame_setting.py +++ b/py/LunaTranslator/gui/dialog_savedgame_setting.py @@ -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(), ], diff --git a/py/LunaTranslator/gui/setting_textinput.py b/py/LunaTranslator/gui/setting_textinput.py index da6cd679..e6e9988b 100644 --- a/py/LunaTranslator/gui/setting_textinput.py +++ b/py/LunaTranslator/gui/setting_textinput.py @@ -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