summaryrefslogtreecommitdiffhomepage
path: root/spline/spline-widget.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'spline/spline-widget.hpp')
-rw-r--r--spline/spline-widget.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/spline/spline-widget.hpp b/spline/spline-widget.hpp
index 178e5b23..ab0060f2 100644
--- a/spline/spline-widget.hpp
+++ b/spline/spline-widget.hpp
@@ -54,6 +54,8 @@ public:
void set_snap(double x, double y) { snap_x = x; snap_y = y; }
void get_snap(double& x, double& y) const { x = snap_x; y = snap_y; }
+
+ QSize minimumSizeHint() const override;
public slots:
void reload_spline();
protected slots:
@@ -79,6 +81,8 @@ private:
void update_range();
void changeEvent(QEvent* e) override;
+ double screen_dpi() const;
+
QPointF pixel_to_point(const QPointF& point);
QPointF point_to_pixel(const QPointF& point);
@@ -105,7 +109,7 @@ private:
// point's circle radius on the widget
static constexpr int point_size_in_pixels_ = 4;
- const double point_size_in_pixels = point_size_in_pixels_ * std::fmax(1, devicePixelRatioF() * .66);
+ const double point_size_in_pixels = point_size_in_pixels_ * screen_dpi();
};
} // ns spline_detail