mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-22 06:33:46 +00:00
Fix an off by 1 bug during hexwidget cursor blinking. (#2368)
1 pixel line sometimes remained on during hexwidget cursor blinking.
This commit is contained in:
parent
2d95786f6e
commit
dcb9970f91
@ -415,7 +415,7 @@ void HexWidget::paintEvent(QPaintEvent *event)
|
||||
if (xOffset > 0)
|
||||
painter.translate(QPoint(-xOffset, 0));
|
||||
|
||||
if (event->rect() == cursor.screenPos) {
|
||||
if (event->rect() == cursor.screenPos.toAlignedRect()) {
|
||||
/* Cursor blink */
|
||||
drawCursor(painter);
|
||||
return;
|
||||
@ -640,7 +640,7 @@ void HexWidget::onCursorBlinked()
|
||||
if (!cursorEnabled)
|
||||
return;
|
||||
cursor.blink();
|
||||
QRect cursorRect(cursor.screenPos.x(), cursor.screenPos.y(), cursor.screenPos.width(), cursor.screenPos.height());
|
||||
QRect cursorRect = cursor.screenPos.toAlignedRect();
|
||||
viewport()->update(cursorRect.translated(-horizontalScrollBar()->value(), 0));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user