modify some sizes

modify some sizes
pull/7064/head
Leif 2022-08-01 20:30:39 +08:00
parent a28b942714
commit 8a8fcac512
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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()