Rename zoom._set_default_zoom to zoom.set_default
This commit is contained in:
parent
1c9d0857cb
commit
868f781f4d
@ -161,10 +161,6 @@ class AbstractZoom(QObject):
|
|||||||
# self.destroyed.connect(functools.partial(
|
# self.destroyed.connect(functools.partial(
|
||||||
# cfg.changed.disconnect, self.init_neighborlist))
|
# cfg.changed.disconnect, self.init_neighborlist))
|
||||||
|
|
||||||
def _set_default_zoom(self):
|
|
||||||
default_zoom = config.get('ui', 'default-zoom')
|
|
||||||
self._set_factor_internal(float(default_zoom) / 100)
|
|
||||||
|
|
||||||
@pyqtSlot(str, str)
|
@pyqtSlot(str, str)
|
||||||
def on_config_changed(self, section, option):
|
def on_config_changed(self, section, option):
|
||||||
if section == 'ui' and option in ('zoom-levels', 'default-zoom'):
|
if section == 'ui' and option in ('zoom-levels', 'default-zoom'):
|
||||||
@ -211,6 +207,10 @@ class AbstractZoom(QObject):
|
|||||||
def factor(self):
|
def factor(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def set_default(self):
|
||||||
|
default_zoom = config.get('ui', 'default-zoom')
|
||||||
|
self._set_factor_internal(float(default_zoom) / 100)
|
||||||
|
|
||||||
@pyqtSlot(QPoint)
|
@pyqtSlot(QPoint)
|
||||||
def on_mouse_wheel_zoom(self, delta):
|
def on_mouse_wheel_zoom(self, delta):
|
||||||
"""Handle zooming via mousewheel requested by the web view."""
|
"""Handle zooming via mousewheel requested by the web view."""
|
||||||
|
@ -459,7 +459,7 @@ class WebViewTab(tabmod.AbstractTab):
|
|||||||
self.search = WebViewSearch(parent=self)
|
self.search = WebViewSearch(parent=self)
|
||||||
self._set_widget(widget)
|
self._set_widget(widget)
|
||||||
self._connect_signals()
|
self._connect_signals()
|
||||||
self.zoom._set_default_zoom() # pylint: disable=protected-access
|
self.zoom.set_default()
|
||||||
self.backend = tabmod.Backend.QtWebKit
|
self.backend = tabmod.Backend.QtWebKit
|
||||||
|
|
||||||
def openurl(self, url):
|
def openurl(self, url):
|
||||||
|
Loading…
Reference in New Issue
Block a user