From 852d9440044afb600897372b42422cf5b0b226df 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: Fri, 20 Sep 2024 17:10:33 +0800 Subject: [PATCH] ... --- LunaTranslator/LunaTranslator/gui/showword.py | 14 +++++++++++--- plugins/CMakeLists.txt | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) 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)