This commit is contained in:
test123456654321 2024-10-28 19:03:55 +08:00
parent a34b0d3867
commit b8a1f4031e
4 changed files with 15 additions and 3 deletions

View File

@ -442,6 +442,11 @@ class AnkiWindow(QWidget):
) )
) )
def createtbn(target: QLineEdit):
clearbtn = QPushButton(qtawesome.icon("fa.times"), "")
clearbtn.clicked.connect(lambda: target.clear())
return clearbtn
self.audiopath = QLineEdit() self.audiopath = QLineEdit()
self.audiopath.setReadOnly(True) self.audiopath.setReadOnly(True)
self.audiopath_sentence = QLineEdit() self.audiopath_sentence = QLineEdit()
@ -558,6 +563,7 @@ class AnkiWindow(QWidget):
recordbtn1, recordbtn1,
soundbutton, soundbutton,
folder_open, folder_open,
functools.partial(createtbn, self.audiopath),
] ]
), ),
getboxlayout( getboxlayout(
@ -567,6 +573,9 @@ class AnkiWindow(QWidget):
recordbtn2, recordbtn2,
soundbutton2, soundbutton2,
folder_open2, folder_open2,
functools.partial(
createtbn, self.audiopath_sentence
),
] ]
), ),
getboxlayout( getboxlayout(
@ -576,6 +585,7 @@ class AnkiWindow(QWidget):
cropbutton, cropbutton,
grabwindowbtn, grabwindowbtn,
folder_open3, folder_open3,
functools.partial(createtbn, self.editpath),
] ]
), ),
self.viewimagelabel, self.viewimagelabel,

View File

@ -74,7 +74,7 @@ def grabwindow(app="PNG", callback_origin=None, tocliponly=False):
hwnd = gobject.baseobject.hwnd hwnd = gobject.baseobject.hwnd
if not hwnd: if not hwnd:
hwnd = windows.GetForegroundWindow() return
hwnd = windows.GetAncestor(hwnd) hwnd = windows.GetAncestor(hwnd)
_ = windows.GetClientRect(hwnd) _ = windows.GetClientRect(hwnd)
p = gdi_screenshot(0, 0, _[2], _[3], hwnd) p = gdi_screenshot(0, 0, _[2], _[3], hwnd)

View File

@ -5,7 +5,9 @@ import winsharedutils
class Outputer(Base): class Outputer(Base):
def dispatch(self, text): def dispatch(self, text):
if globalconfig["sourcestatus2"]["copy"]["use"]: if globalconfig["sourcestatus2"]["copy"]["use"] and (
not globalconfig["excule_from_self"]
):
return return
winsharedutils.clipboard_set(text) winsharedutils.clipboard_set(text)

View File

@ -29,7 +29,7 @@ include(generate_product_version)
set(VERSION_MAJOR 5) set(VERSION_MAJOR 5)
set(VERSION_MINOR 52) set(VERSION_MINOR 52)
set(VERSION_PATCH 1) set(VERSION_PATCH 2)
add_library(pch pch.cpp) add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h) target_precompile_headers(pch PUBLIC pch.h)