diff --git a/LunaTranslator/LunaTranslator/gui/usefulwidget.py b/LunaTranslator/LunaTranslator/gui/usefulwidget.py index 79229204..ba4038fe 100644 --- a/LunaTranslator/LunaTranslator/gui/usefulwidget.py +++ b/LunaTranslator/LunaTranslator/gui/usefulwidget.py @@ -795,6 +795,9 @@ class WebivewWidget(abstractwebview): def set_zoom(self, zoom): self.put_ZoomFactor(zoom) + def get_ZoomFactor(self): + return winsharedutils.get_ZoomFactor(self.get_controller()) + def put_ZoomFactor(self, zoom): winsharedutils.put_ZoomFactor(self.get_controller(), zoom) diff --git a/LunaTranslator/LunaTranslator/rendertext/webview.py b/LunaTranslator/LunaTranslator/rendertext/webview.py index 5a8c7c79..b9e3e213 100644 --- a/LunaTranslator/LunaTranslator/rendertext/webview.py +++ b/LunaTranslator/LunaTranslator/rendertext/webview.py @@ -91,7 +91,9 @@ class TextBrowser(QWidget, dataget): pass def calllunaheightchange(self, h): - self.contentsChanged.emit(QSize(self.width(), h)) + self.contentsChanged.emit( + QSize(self.width(), h * self.webivewwidget.get_ZoomFactor()) + ) def internalheighchange(self): self.testeval(