From 5181e8e95ae42f067a2a122e71ea517c857315e7 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Wed, 9 Sep 2020 15:00:35 +0300 Subject: [PATCH] Reduce point radius for linux when scaled up --- graphs/gui/vector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/graphs/gui/vector.py b/graphs/gui/vector.py index 393bd8e6f..8542e7e8c 100644 --- a/graphs/gui/vector.py +++ b/graphs/gui/vector.py @@ -125,9 +125,11 @@ class VectorPicker(wx.Window): a = math.radians(self._angle + self._offset) x = math.cos(a) * radius y = math.sin(a) * radius + # See PR #2260 on why this is needed + pointRadius = 2 / self.GetContentScaleFactor() if 'wxGTK' in wx.PlatformInfo else 2 dc.DrawLine(radius + 2, radius + 2, radius + 2 + x * self._length, radius + 2 - y * self._length) dc.SetBrush(wx.BLACK_BRUSH) - dc.DrawCircle(radius + 2 + x * self._length, radius + 2 - y * self._length, 2) + dc.DrawCircle(radius + 2 + x * self._length, radius + 2 - y * self._length, pointRadius) if self._label: labelText = self._label