forked from Mirrors/apostrophe
Reduce sync scrolling precision
High precision leads to micro-scrolling, and 1e-4 is more than enough.github/fork/yochananmarqos/patch-1
parent
55d82856c2
commit
3fa56afaef
|
@ -150,12 +150,12 @@ class PreviewHandler:
|
|||
self.__show(step=Step.RENDER)
|
||||
|
||||
def on_text_view_scrolled(self, _text_view, scale):
|
||||
if self.shown and not math.isclose(scale, self.web_view.get_scroll_scale(), rel_tol=1e-5):
|
||||
if self.shown and not math.isclose(scale, self.web_view.get_scroll_scale(), rel_tol=1e-4):
|
||||
self.web_view.set_scroll_scale(scale)
|
||||
|
||||
def on_web_view_scrolled(self, _web_view, scale):
|
||||
if self.shown and self.text_view.get_mapped() and \
|
||||
not math.isclose(scale, self.text_view.get_scroll_scale(), rel_tol=1e-5):
|
||||
not math.isclose(scale, self.text_view.get_scroll_scale(), rel_tol=1e-4):
|
||||
self.text_view.set_scroll_scale(scale)
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in New Issue