From fd68661981d24c34b145e2771f5112cd352a44c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sun, 4 Aug 2024 11:44:25 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/gui/showword.py | 6 +++--- LunaTranslator/LunaTranslator/gui/usefulwidget.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/showword.py b/LunaTranslator/LunaTranslator/gui/showword.py index a55cf3b6..162c8d91 100644 --- a/LunaTranslator/LunaTranslator/gui/showword.py +++ b/LunaTranslator/LunaTranslator/gui/showword.py @@ -706,12 +706,11 @@ class searchwordW(closeashidewindow): self.vboxlayout.addLayout(self.searchlayout) self.searchtext = QLineEdit1() self.searchtext.textChanged.connect(self.ankiwindow.reset) - - self.history_last_btn = QPushButton(qtawesome.icon("fa.arrow-left"), "") + self.history_last_btn = statusbutton(icons=["fa.arrow-left", "fa.arrow-left"], colors=["", ""]) self.history_last_btn.clicked.connect( functools.partial(self.__move_history_search, -1) ) - self.history_next_btn = QPushButton(qtawesome.icon("fa.arrow-right"), "") + self.history_next_btn = statusbutton(icons=["fa.arrow-right", "fa.arrow-right"], colors=["", ""]) self.history_next_btn.clicked.connect( functools.partial(self.__move_history_search, 1) ) @@ -723,6 +722,7 @@ class searchwordW(closeashidewindow): self.searchlayout.addWidget(self.history_next_btn) self.searchlayout.addWidget(self.searchtext) searchbutton = QPushButton(qtawesome.icon("fa.search"), "") + self.searchtext.returnPressed.connect(searchbutton.clicked.emit) searchbutton.clicked.connect(self.__search_by_click_search_btn) self.searchlayout.addWidget(searchbutton) diff --git a/LunaTranslator/LunaTranslator/gui/usefulwidget.py b/LunaTranslator/LunaTranslator/gui/usefulwidget.py index 7c786eba..3206e284 100644 --- a/LunaTranslator/LunaTranslator/gui/usefulwidget.py +++ b/LunaTranslator/LunaTranslator/gui/usefulwidget.py @@ -293,6 +293,8 @@ class commonsolveevent(QWidget): def disablecolor(__: QColor): + if __.rgb() == 0xFF000000: + return Qt.GlobalColor.gray __ = QColor( max(0, (__.red() - 64)), max(