make the shadow selection wider in hex (#1584)

This commit is contained in:
Itay Cohen 2019-05-25 10:02:20 +03:00 committed by GitHub
parent 31838a3a35
commit 14665cbe8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -680,6 +680,7 @@ void HexWidget::drawCursor(QPainter &painter, bool shadow)
QPen pen(Qt::gray);
pen.setStyle(Qt::DashLine);
painter.setPen(pen);
shadowCursor.screenPos.setWidth(cursorOnAscii ? itemWidth() : charWidth);
painter.drawRect(shadowCursor.screenPos);
painter.setPen(Qt::SolidLine);
}
@ -863,7 +864,6 @@ void HexWidget::updateMetrics()
shadowCursor.screenPos.moveTopLeft(itemArea.topLeft());
} else {
cursor.screenPos.moveTopLeft(itemArea.topLeft());
shadowCursor.screenPos.setWidth(charWidth);
shadowCursor.screenPos.moveTopLeft(asciiArea.topLeft());
}