Disable align to 0 of HexdumpWidget, highlight current seek (FIX #64) (#492)

* Disable align to 0 of HexdumpWidget, highlight current seek

Disabled the alginment to `0x???????0` and made the current seek the first column.
Added color to highlight the current seek address.

* fixed camelCase

* Fixed camelCase#2
This commit is contained in:
Itay Cohen 2018-05-13 17:43:38 +03:00 committed by xarkes
parent 21400952f2
commit fad76ecddb

View File

@ -289,9 +289,6 @@ void HexdumpWidget::refresh(RVA addr)
if (cols == 0)
cols = 16;
// Align addr to cols
addr -= addr % cols;
// TODO: Figure out how to calculate a sane value for this
bufferLines = qhelpers::getMaxFullyDisplayedLines(ui->hexHexText);
@ -321,6 +318,12 @@ void HexdumpWidget::refresh(RVA addr)
ui->hexHexText->setTextCursor(cursor);
ui->hexHexText->ensureCursorVisible();
// Set the backgorund color of the current seek
QTextCursor offsetCursor(ui->hexOffsetText->document()->findBlockByLineNumber(curAddrLineOffset));
QTextBlockFormat formatTmp = offsetCursor.blockFormat();
formatTmp.setBackground(QColor(64, 129, 160));
offsetCursor.setBlockFormat(formatTmp);
updateWidths();
// Update other text areas scroll