提交 8a8fcac5 编写于 作者: qq_25193841's avatar qq_25193841

modify some sizes

modify some sizes
上级 a28b9427
...@@ -231,7 +231,7 @@ class MainWindow(QMainWindow): ...@@ -231,7 +231,7 @@ class MainWindow(QMainWindow):
# Create and add a widget for showing current label item index # Create and add a widget for showing current label item index
self.indexList = QListWidget() 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.setEditTriggers(QAbstractItemView.NoEditTriggers) # no editable
self.indexList.itemSelectionChanged.connect(self.indexSelectionChanged) self.indexList.itemSelectionChanged.connect(self.indexSelectionChanged)
self.indexList.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) # no scroll Bar self.indexList.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff) # no scroll Bar
......
...@@ -627,7 +627,7 @@ class Canvas(QWidget): ...@@ -627,7 +627,7 @@ class Canvas(QWidget):
# adaptive BBOX label & index font size # adaptive BBOX label & index font size
if self.pixmap: if self.pixmap:
h, w = self.pixmap.size().height(), self.pixmap.size().width() 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: for s in self.shapes:
s.fontsize = fontszie s.fontsize = fontszie
......
...@@ -126,7 +126,7 @@ class Shape(object): ...@@ -126,7 +126,7 @@ class Shape(object):
color = self.select_line_color if self.selected else self.line_color color = self.select_line_color if self.selected else self.line_color
pen = QPen(color) pen = QPen(color)
# Try using integer sizes for smoother drawing(?) # 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) painter.setPen(pen)
line_path = QPainterPath() line_path = QPainterPath()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册