From c4bd15bdf269fd1fe18b323e6d68d4bdfdb3d784 Mon Sep 17 00:00:00 2001 From: Roy Shilkrot Date: Fri, 11 Oct 2024 08:41:51 -0400 Subject: [PATCH] UI bugfixes --- src/resizable_rect.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/resizable_rect.py b/src/resizable_rect.py index c6235bc..37afa4a 100644 --- a/src/resizable_rect.py +++ b/src/resizable_rect.py @@ -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) @@ -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):