diff --git a/gui/attribute_gauge.py b/gui/attribute_gauge.py index 141db410f..08e1e1cb8 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(round(x * 10), 1, 1, rect.height) + dc.DrawRectangle(round(x * 10), 1, 1, round(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(round(padding), 1, w, rect.height) + dc.DrawRectangle(round(padding), 1, round(w), round(rect.height)) else: padding = half - w + 1 if is_even else math.ceil(half) - (w - 1) - dc.DrawRectangle(round(padding), 1, w, rect.height) + dc.DrawRectangle(round(padding), 1, round(w), round(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(round(min(padding + w, rect.width)), 1, 1, rect.height) + dc.DrawRectangle(round(min(padding + w, rect.width)), 1, 1, round(rect.height)) else: - dc.DrawRectangle(round(max(padding - 1, 1)), 1, 1, rect.height) + dc.DrawRectangle(round(max(padding - 1, 1)), 1, 1, round(rect.height)) def OnTimer(self, event): old_value = self._old_percentage diff --git a/gui/builtinShipBrowser/pfBitmapFrame.py b/gui/builtinShipBrowser/pfBitmapFrame.py index 20755c1f4..fbf31dced 100644 --- a/gui/builtinShipBrowser/pfBitmapFrame.py +++ b/gui/builtinShipBrowser/pfBitmapFrame.py @@ -63,4 +63,4 @@ class PFBitmapFrame(wx.Frame): mdc.DrawBitmap(self.bitmap, 0, 0) mdc.SetPen(wx.Pen("#000000", width=1)) mdc.SetBrush(wx.TRANSPARENT_BRUSH) - mdc.DrawRectangle(0, 0, rect.width, rect.height) + mdc.DrawRectangle(0, 0, round(rect.width), round(rect.height)) diff --git a/gui/builtinViews/fittingView.py b/gui/builtinViews/fittingView.py index c08c0d136..62903a2d6 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(round(cx), round(cy), maxWidth - cx, maxRowHeight) + mdc.DrawRectangle(round(cx), round(cy), round(maxWidth - cx), round(maxRowHeight)) for i, col in enumerate(self.activeColumns): if i > maxColumns: diff --git a/gui/chrome_tabs.py b/gui/chrome_tabs.py index 7754554da..3b4cde2db 100644 --- a/gui/chrome_tabs.py +++ b/gui/chrome_tabs.py @@ -1514,7 +1514,7 @@ class PFNotebookPagePreview(wx.Frame): x, y = mdc.GetTextExtent(self.title) mdc.SetBrush(wx.Brush(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT))) - mdc.DrawRectangle(0, 0, rect.width, 16) + mdc.DrawRectangle(0, 0, round(rect.width), 16) mdc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)) @@ -1523,4 +1523,4 @@ class PFNotebookPagePreview(wx.Frame): mdc.SetPen(wx.Pen("#000000", width=1)) mdc.SetBrush(wx.TRANSPARENT_BRUSH) - mdc.DrawRectangle(0, 16, rect.width, rect.height - 16) + mdc.DrawRectangle(0, 16, round(rect.width), round(rect.height - 16)) diff --git a/gui/utils/anim.py b/gui/utils/anim.py index ede580d51..e2042be3a 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(round(x), round(y), barWidth, bh) + dc.DrawRectangle(round(x), round(y), round(barWidth), round(bh)) x += barWidth textColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT)