mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
..
This commit is contained in:
parent
f12720620b
commit
c609330e41
@ -751,7 +751,6 @@ class searchwordW(closeashidewindow):
|
|||||||
html = self.cache_results[self.tabks[idx]]
|
html = self.cache_results[self.tabks[idx]]
|
||||||
except:
|
except:
|
||||||
return
|
return
|
||||||
self.textOutput.set_zoom(globalconfig["ZoomFactor"])
|
|
||||||
self.textOutput.setHtml(html)
|
self.textOutput.setHtml(html)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
|
@ -788,6 +788,7 @@ class QWebWrap(abstractwebview):
|
|||||||
t.start(0)
|
t.start(0)
|
||||||
|
|
||||||
def set_zoom(self, zoom):
|
def set_zoom(self, zoom):
|
||||||
|
self.internal_zoom = zoom
|
||||||
self.internal.setZoomFactor(zoom)
|
self.internal.setZoomFactor(zoom)
|
||||||
|
|
||||||
def __getzoomfactor(self):
|
def __getzoomfactor(self):
|
||||||
@ -819,10 +820,12 @@ class auto_select_webview(QWidget):
|
|||||||
|
|
||||||
def navigate(self, url):
|
def navigate(self, url):
|
||||||
self._maybecreate()
|
self._maybecreate()
|
||||||
|
self.internal.set_zoom(self.internalsavedzoom)
|
||||||
self.internal.navigate(url)
|
self.internal.navigate(url)
|
||||||
|
|
||||||
def setHtml(self, html):
|
def setHtml(self, html):
|
||||||
self._maybecreate()
|
self._maybecreate()
|
||||||
|
self.internal.set_zoom(self.internalsavedzoom)
|
||||||
html = self.internal.parsehtml(html)
|
html = self.internal.parsehtml(html)
|
||||||
if len(html) < self.internal.html_limit:
|
if len(html) < self.internal.html_limit:
|
||||||
self.internal.setHtml(html)
|
self.internal.setHtml(html)
|
||||||
@ -834,6 +837,7 @@ class auto_select_webview(QWidget):
|
|||||||
self.internal.navigate(lastcachehtml)
|
self.internal.navigate(lastcachehtml)
|
||||||
|
|
||||||
def set_zoom(self, zoom):
|
def set_zoom(self, zoom):
|
||||||
|
self.internalsavedzoom = zoom
|
||||||
self.internal.set_zoom(zoom)
|
self.internal.set_zoom(zoom)
|
||||||
|
|
||||||
def sizeHint(self):
|
def sizeHint(self):
|
||||||
@ -870,6 +874,9 @@ class auto_select_webview(QWidget):
|
|||||||
if self.internal:
|
if self.internal:
|
||||||
self.layout().removeWidget(self.internal)
|
self.layout().removeWidget(self.internal)
|
||||||
self.internal = self._createwebview()
|
self.internal = self._createwebview()
|
||||||
|
self.internal.set_zoom(self.internalsavedzoom)
|
||||||
|
self.internal.on_load.connect(self.on_load)
|
||||||
|
self.internal.on_ZoomFactorChanged.connect(self.internalzoomchanged)
|
||||||
self.layout().addWidget(self.internal)
|
self.layout().addWidget(self.internal)
|
||||||
|
|
||||||
def _createwebview(self):
|
def _createwebview(self):
|
||||||
@ -885,9 +892,6 @@ class auto_select_webview(QWidget):
|
|||||||
print_exc()
|
print_exc()
|
||||||
self.is_fallback = self.contex
|
self.is_fallback = self.contex
|
||||||
browser = mshtmlWidget()
|
browser = mshtmlWidget()
|
||||||
browser.set_zoom(self.internalsavedzoom)
|
|
||||||
browser.on_load.connect(self.on_load)
|
|
||||||
browser.on_ZoomFactorChanged.connect(self.internalzoomchanged)
|
|
||||||
return browser
|
return browser
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user