diff --git a/LunaTranslator/LunaTranslator/gui/showword.py b/LunaTranslator/LunaTranslator/gui/showword.py index 86cedb81..c2155c19 100644 --- a/LunaTranslator/LunaTranslator/gui/showword.py +++ b/LunaTranslator/LunaTranslator/gui/showword.py @@ -231,7 +231,7 @@ class AnkiWindow(QWidget): else: collect.append(hira["orig"]) example = "".join(collect) - ruby = self.ruby + ruby = self.zhuyinedit.toPlainText() dictionaryInfo = [] dictionaryContent = {} for _ in dictionarys: @@ -442,6 +442,7 @@ class AnkiWindow(QWidget): self.viewimagelabel = pixmapviewer() self.editpath.textChanged.connect(self.wrappedpixmap) self.example = FQPlainTextEdit() + self.zhuyinedit = FQPlainTextEdit() self.example.hiras = None def __(): @@ -511,6 +512,11 @@ class AnkiWindow(QWidget): ), ] ), + getboxlayout( + [LLabel("注音"), self.zhuyinedit], + QVBoxLayout, + margin0=True, + ), getboxlayout( [LLabel("例句"), self.example], QVBoxLayout, @@ -619,9 +625,11 @@ class AnkiWindow(QWidget): def reset(self, text): self.currentword = text if text and len(text): - self.ruby = self.makerubyhtml(gobject.baseobject.parsehira(text)) + self.zhuyinedit.setPlainText( + self.makerubyhtml(gobject.baseobject.parsehira(text)) + ) else: - self.ruby = "" + self.zhuyinedit.clear() self.editpath.clear() self.audiopath.clear() self.audiopath_sentence.clear() diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 268e2757..dcc7c531 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 38) -set(VERSION_PATCH 3) +set(VERSION_PATCH 4) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)