diff --git a/gui/attribute_gauge.py b/gui/attribute_gauge.py index 257a3356e..141db410f 100644 --- a/gui/attribute_gauge.py +++ b/gui/attribute_gauge.py @@ -212,7 +212,7 @@ class AttributeGauge(wx.Window): for x in range(1, 20): dc.SetBrush(wx.Brush(wx.LIGHT_GREY)) dc.SetPen(wx.Pen(wx.LIGHT_GREY)) - dc.DrawRectangle(x * 10, 1, 1, rect.height) + dc.DrawRectangle(round(x * 10), 1, 1, rect.height) dc.SetBrush(wx.Brush(colour)) dc.SetPen(wx.Pen(colour)) @@ -222,19 +222,19 @@ class AttributeGauge(wx.Window): if value >= 0: padding = (half if is_even else math.ceil(half - 1)) + 1 - dc.DrawRectangle(padding, 1, w, rect.height) + dc.DrawRectangle(round(padding), 1, w, rect.height) else: padding = half - w + 1 if is_even else math.ceil(half) - (w - 1) - dc.DrawRectangle(padding, 1, w, rect.height) + dc.DrawRectangle(round(padding), 1, w, rect.height) if self.leading_edge and (self.edge_on_neutral or value != 0): dc.SetPen(wx.Pen(wx.WHITE)) dc.SetBrush(wx.Brush(wx.WHITE)) if value > 0: - dc.DrawRectangle(min(padding + w, rect.width), 1, 1, rect.height) + dc.DrawRectangle(round(min(padding + w, rect.width)), 1, 1, rect.height) else: - dc.DrawRectangle(max(padding - 1, 1), 1, 1, rect.height) + dc.DrawRectangle(round(max(padding - 1, 1)), 1, 1, rect.height) def OnTimer(self, event): old_value = self._old_percentage diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index 657360c16..c08c0d136 100644 --- a/gui/builtinViews/fittingView.py +++ b/gui/builtinViews/fittingView.py @@ -956,7 +956,7 @@ class FittingView(d.Display): cx = padding if slotMap[st.slot]: - mdc.DrawRectangle(cx, cy, maxWidth - cx, maxRowHeight) + mdc.DrawRectangle(round(cx), round(cy), maxWidth - cx, maxRowHeight) for i, col in enumerate(self.activeColumns): if i > maxColumns: diff --git a/gui/utils/anim.py b/gui/utils/anim.py index 55d27c9ef..ede580d51 100644 --- a/gui/utils/anim.py +++ b/gui/utils/anim.py @@ -80,7 +80,7 @@ class LoadAnimation(wx.Window): bh = rect.height y = 0 - dc.DrawRectangle(x, y, barWidth, bh) + dc.DrawRectangle(round(x), round(y), barWidth, bh) x += barWidth textColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)