Removed vertical lines for single byte annotation items

This commit is contained in:
Nav
2021-12-26 00:12:21 +00:00
parent 1d09f89acf
commit 893be12597

View File

@@ -70,26 +70,29 @@ void AnnotationItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* op
); );
painter->setPen(lineColor); painter->setPen(lineColor);
painter->drawLine(QLine(
ByteItem::WIDTH / 2,
verticalLineYStart,
ByteItem::WIDTH / 2,
verticalLineYEnd
));
painter->drawLine(QLine( if (this->size > 1) {
this->width - (ByteItem::WIDTH / 2), painter->drawLine(QLine(
verticalLineYStart, ByteItem::WIDTH / 2,
this->width - (ByteItem::WIDTH / 2), verticalLineYStart,
verticalLineYEnd ByteItem::WIDTH / 2,
)); verticalLineYEnd
));
painter->drawLine(QLine( painter->drawLine(QLine(
ByteItem::WIDTH / 2, this->width - (ByteItem::WIDTH / 2),
verticalLineYEnd, verticalLineYStart,
(ByteItem::WIDTH / 2) + (this->width - ByteItem::WIDTH), this->width - (ByteItem::WIDTH / 2),
verticalLineYEnd verticalLineYEnd
)); ));
painter->drawLine(QLine(
ByteItem::WIDTH / 2,
verticalLineYEnd,
(ByteItem::WIDTH / 2) + (this->width - ByteItem::WIDTH),
verticalLineYEnd
));
}
painter->drawLine(QLine( painter->drawLine(QLine(
this->width / 2, this->width / 2,