summaryrefslogtreecommitdiffhomepage
path: root/spline
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-08-01 10:44:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-08-01 10:45:13 +0200
commit8fbcdf775660a0cc1857e8bedee7ac2351292aa6 (patch)
tree359200fc5b57fc5ca33ba80bc1218060b42dcc92 /spline
parent9b07c79a0d732695e22bae69f7821bd0e88416ff (diff)
spline: don't use faulty devicePixelRatioF()
Diffstat (limited to 'spline')
-rw-r--r--spline/spline-widget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp
index fd07bf78..0dfac0e9 100644
--- a/spline/spline-widget.cpp
+++ b/spline/spline-widget.cpp
@@ -185,8 +185,8 @@ void spline_widget::drawFunction()
painter.setPen(QPen(color_, 2, Qt::SolidLine, Qt::FlatCap));
- const double dpr = devicePixelRatioF();
- const double line_length_pixels = std::fmax(1, 2 * dpr);
+ const double dpr = screen_dpi();
+ const double line_length_pixels = std::fmax(1, dpr);
const double step = std::fmax(.1, line_length_pixels / c.x());
const double maxx = config->max_input();