Skip to content

Commit

Permalink
py2 compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ImLucasBrown committed Feb 9, 2021
1 parent 846e6aa commit 809335c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions nxt_editor/dockwidgets/code_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,9 +1303,8 @@ def paintEvent(self, event):
# Draw center message text
msg_offset = font_metrics.boundingRect(self.click_msg).width()
msg_offset += painter.font().pointSize()
pos = (self.rect().center().x() - (msg_offset*.5),
self.rect().center().y())
painter.drawText(*pos, self.click_msg)
painter.drawText(self.rect().center().x() - (msg_offset*.5),
self.rect().center().y(), self.click_msg)
painter.setCompositionMode(QtGui.QPainter.CompositionMode_Darken)
path = QtGui.QPainterPath()
path.addRoundedRect(QtCore.QRectF(self.rect()), 9, 9)
Expand Down
5 changes: 4 additions & 1 deletion nxt_editor/dockwidgets/widget_builder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Built-in
import logging
import ast
import collections.abc
try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable

# External
from Qt import QtWidgets
Expand Down

0 comments on commit 809335c

Please sign in to comment.