Improve hexdump width calculation. (#1389)

This commit is contained in:
karliss 2019-03-25 00:12:14 +02:00 committed by Itay Cohen
parent a2eb0011f4
commit 8d6622ac81

View File

@ -1225,8 +1225,8 @@ void HexdumpWidget::zoomOut(int range)
void HexdumpWidget::updateWidths()
{
// Update width
ui->hexHexText->document()->adjustSize();
ui->hexHexText->setFixedWidth(ui->hexHexText->document()->size().width());
auto idealWidth = ui->hexHexText->document()->idealWidth();
ui->hexHexText->document()->setTextWidth(idealWidth);
ui->hexOffsetText->document()->adjustSize();
ui->hexOffsetText->setFixedWidth(ui->hexOffsetText->document()->size().width());