From c22a7bf26909f107766a8b464f858b3625213620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Fri, 1 Nov 2024 19:19:18 +0800 Subject: [PATCH] ui --- src/LunaTranslator/gui/selecthook.py | 41 +++++++++++++--------------- src/plugins/CMakeLists.txt | 2 +- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/LunaTranslator/gui/selecthook.py b/src/LunaTranslator/gui/selecthook.py index 0a8aafcf..322c5504 100644 --- a/src/LunaTranslator/gui/selecthook.py +++ b/src/LunaTranslator/gui/selecthook.py @@ -636,23 +636,12 @@ class hookselect(closeashidewindow): self.userhooklayout = QHBoxLayout() self.vboxlayout.addLayout(self.userhooklayout) - self.userhook = QLineEdit() - self.userhooklayout.addWidget(self.userhook) - self.userhookinsert = LPushButton("插入特殊码") - self.userhookinsert.clicked.connect(self.inserthook) - self.userhooklayout.addWidget(self.userhookinsert) - - self.userhookinsert = QPushButton(icon=qtawesome.icon("fa.question")) - self.userhookinsert.clicked.connect(lambda: dialog_showinfo(self)) - self.userhooklayout.addWidget(self.userhookinsert) - - self.userhookfind = LPushButton("搜索特殊码") - self.userhookfind.clicked.connect(self.findhook) - self.userhooklayout.addWidget(self.userhookfind) + self.searchtext = QLineEdit() + self.searchtext.textChanged.connect(self.searchtextfunc) + self.userhooklayout.addWidget(self.searchtext) self.opensolvetextb = LPushButton("文本处理") self.opensolvetextb.clicked.connect(self.opensolvetext) - self.userhooklayout.addWidget(QLabel(" ")) self.userhooklayout.addWidget(self.opensolvetextb) self.settingbtn = LPushButton("游戏设置") @@ -662,7 +651,6 @@ class hookselect(closeashidewindow): ################# self.searchtextlayout = QHBoxLayout() self.vboxlayout.addLayout(self.searchtextlayout) - self.searchtext = QLineEdit() __ = LPushButton("游戏适配") __.clicked.connect( lambda: gobject.baseobject.openlink( @@ -670,10 +658,21 @@ class hookselect(closeashidewindow): ) ) self.searchtextlayout.addWidget(__) - self.searchtextlayout.addWidget(self.searchtext) - self.searchtextbutton = LPushButton("搜索") - self.searchtextbutton.clicked.connect(self.searchtextfunc) - self.searchtextlayout.addWidget(self.searchtextbutton) + + self.userhook = QLineEdit() + self.searchtextlayout.addWidget(self.userhook) + self.userhookinsert = LPushButton("插入特殊码") + self.userhookinsert.clicked.connect(self.inserthook) + self.searchtextlayout.addWidget(self.userhookinsert) + + self.userhookinsert = QPushButton(icon=qtawesome.icon("fa.question")) + self.userhookinsert.clicked.connect(lambda: dialog_showinfo(self)) + self.searchtextlayout.addWidget(self.userhookinsert) + + self.userhookfind = LPushButton("搜索特殊码") + self.userhookfind.clicked.connect(self.findhook) + self.searchtextlayout.addWidget(self.userhookfind) + ################### self.ttCombomodelmodel2 = LStandardItemModel() self.tttable2 = TableViewW() @@ -774,9 +773,7 @@ class hookselect(closeashidewindow): hide = (searchtext not in res) or self.gethide(res) self.tttable2.setRowHidden(_index, hide) - def searchtextfunc(self): - searchtext = self.searchtext.text() - + def searchtextfunc(self, searchtext): # self.ttCombomodelmodel.blockSignals(True) try: for row in range(self.ttCombomodelmodel.rowCount()): diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index d41622ce..cd54141f 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 53) -set(VERSION_PATCH 6) +set(VERSION_PATCH 7) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)