Skip to content

Commit

Permalink
UI bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed Oct 11, 2024
1 parent b179a59 commit c4bd15b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/resizable_rect.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def setupTextItems(self, image_size, boxDisplayStyle):
fontPos = QFont("Arial", int(image_size / 60) if image_size > 0 else 32)
fontPos.setWeight(QFont.Weight.Bold)
self.posItem.setFont(fontPos)
self.posItem.setPen(QPen(QColor("black"), 1))
self.resultItem.setBrush(QBrush(QColor("red")))
fontRes = QFont("Arial", int(image_size / 75) if image_size > 0 else 20)
fontRes.setWeight(QFont.Weight.Bold)
Expand Down Expand Up @@ -263,6 +264,7 @@ def updateTextLabelPosition(self):
ypos = self.boundingRect().y() - self.posItem.boundingRect().height()
# set the text position to the top left corner of the rect
self.posItem.setPos(xpos, ypos)
self.bgItem.setRect(self.posItem.boundingRect())
self.bgItem.setPos(xpos, ypos)

def setBoxDisplayStyle(self, boxDisplayStyle: int):
Expand Down

0 comments on commit c4bd15b

Please sign in to comment.