From 8a8fcac5121d96383a4d4c58f53cf4094261a7e3 Mon Sep 17 00:00:00 2001 From: Leif <4603009@qq.com> Date: Mon, 1 Aug 2022 20:30:39 +0800 Subject: [PATCH] modify some sizes modify some sizes --- PPOCRLabel/PPOCRLabel.py | 2 +- PPOCRLabel/libs/canvas.py | 2 +- PPOCRLabel/libs/shape.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 9e67f0cc..827f1cf7 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -231,7 +231,7 @@ class MainWindow(QMainWindow): # Create and add a widget for showing current label item index self.indexList = QListWidget() - self.indexList.setMaximumSize(40, 16777215) # limit max width + self.indexList.setMaximumSize(30, 16777215) # limit max width self.indexList.setEditTriggers(QAbstractItemView.NoEditTriggers) # no editable self.indexList.itemSelectionChanged.connect(self.indexSelectionChanged) self.indexList.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) # no scroll Bar diff --git a/PPOCRLabel/libs/canvas.py b/PPOCRLabel/libs/canvas.py index 81f37995..ae951161 100644 --- a/PPOCRLabel/libs/canvas.py +++ b/PPOCRLabel/libs/canvas.py @@ -627,7 +627,7 @@ class Canvas(QWidget): # adaptive BBOX label & index font size if self.pixmap: h, w = self.pixmap.size().height(), self.pixmap.size().width() - fontszie = int(max(h, w) / 48) + fontszie = int(max(h, w) / 96) for s in self.shapes: s.fontsize = fontszie diff --git a/PPOCRLabel/libs/shape.py b/PPOCRLabel/libs/shape.py index 121e43b8..3eda5bdf 100644 --- a/PPOCRLabel/libs/shape.py +++ b/PPOCRLabel/libs/shape.py @@ -126,7 +126,7 @@ class Shape(object): color = self.select_line_color if self.selected else self.line_color pen = QPen(color) # Try using integer sizes for smoother drawing(?) - pen.setWidth(max(1, int(round(2.0 / self.scale)))) + # pen.setWidth(max(1, int(round(2.0 / self.scale)))) painter.setPen(pen) line_path = QPainterPath() -- GitLab