From dc7fcbe7923c8054c4ef4fe08734890c90fc4874 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 4 Sep 2021 14:24:33 -0400 Subject: [PATCH] Tweak mouse rate limits per sway experiments; size line dot to dpi font --- piker/ui/_cursor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/piker/ui/_cursor.py b/piker/ui/_cursor.py index 8d5ba831..fd9df0f0 100644 --- a/piker/ui/_cursor.py +++ b/piker/ui/_cursor.py @@ -31,6 +31,7 @@ from ._style import ( _xaxis_at, hcolor, _font_small, + _font, ) from ._axes import YAxisLabel, XAxisLabel from ..log import get_logger @@ -41,8 +42,9 @@ log = get_logger(__name__) # XXX: these settings seem to result in really decent mouse scroll # latency (in terms of perceived lag in cross hair) so really be sure # there's an improvement if you want to change it! -_mouse_rate_limit = 60 # TODO; should we calc current screen refresh rate? -_debounce_delay = 1 / 1e3 + +_mouse_rate_limit = 120 # TODO; should we calc current screen refresh rate? +_debounce_delay = 1 / 40 _ch_label_opac = 1 @@ -58,10 +60,12 @@ class LineDot(pg.CurvePoint): plot: 'ChartPlotWidget', # type: ingore # noqa pos=None, - size: int = 6, # in pxs color: str = 'default_light', ) -> None: + # scale from dpi aware font size + size = int(_font.px_size * 0.375) + pg.CurvePoint.__init__( self, curve,