Skip to content

Commit

Permalink
Merge pull request lukas-blecher#195 from FrankFrank9/patch-1
Browse files Browse the repository at this point in the history
Solved Retina display issues
  • Loading branch information
lukas-blecher authored Sep 25, 2022
2 parents 1a109bc + 575a82e commit b9274d3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pix2tex/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,10 @@ def mouseReleaseEvent(self, event):
# account for retina display. #TODO how to check if device is actually using retina display
factor = 2 if sys.platform == "darwin" else 1

x1 = int(min(startPos[0], endPos[0])*factor)
y1 = int(min(startPos[1], endPos[1])*factor)
x2 = int(max(startPos[0], endPos[0])*factor)
y2 = int(max(startPos[1], endPos[1])*factor)
x1 = int(min(startPos[0], endPos[0]))
y1 = int(min(startPos[1], endPos[1]))
x2 = int(max(startPos[0], endPos[0]))
y2 = int(max(startPos[1], endPos[1]))

self.repaint()
QApplication.processEvents()
Expand All @@ -297,7 +297,6 @@ def mouseReleaseEvent(self, event):
self.end = QtCore.QPoint()
self.parent.returnSnip(img)


def main(arguments):
with in_model_path():
app = QApplication(sys.argv)
Expand Down

0 comments on commit b9274d3

Please sign in to comment.