From 3a4e87ca419998b2ef96c80eaa0373bf7696009e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Mon, 20 Nov 2017 11:29:59 +0100 Subject: [PATCH] Replace HexdumpWidget::resizeHexdump() with sizePolicy --- src/widgets/HexdumpWidget.cpp | 12 ------------ src/widgets/HexdumpWidget.h | 1 - src/widgets/HexdumpWidget.ui | 16 ++-------------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/widgets/HexdumpWidget.cpp b/src/widgets/HexdumpWidget.cpp index 8f74e8b9..dff4c1ce 100644 --- a/src/widgets/HexdumpWidget.cpp +++ b/src/widgets/HexdumpWidget.cpp @@ -290,7 +290,6 @@ void HexdumpWidget::refresh(RVA addr) ui->hexOffsetText->setPlainText(hexdump[0]); ui->hexHexText->setPlainText(hexdump[1]); ui->hexASCIIText->setPlainText(hexdump[2]); - resizeHexdump(); int seekLine = static_cast((addr - topOffset) / cols); @@ -516,14 +515,6 @@ std::array HexdumpWidget::fetchHexdump(RVA offset, RVA bytes) return { offsets, hex, ascii }; } -void HexdumpWidget::resizeHexdump() -{ - ui->hexOffsetText->setMinimumWidth(static_cast(ui->hexOffsetText->document()->size().width())); - ui->hexHexText->setMinimumWidth(static_cast(ui->hexHexText->document()->size().width())); - - //this->hexASCIIText->setMinimumWidth(this->hexASCIIText->document()->size().width()); -} - void HexdumpWidget::adjustHexdumpLines() { QScrollBar *sb = ui->hexASCIIText->verticalScrollBar(); @@ -722,7 +713,6 @@ void HexdumpWidget::setupFonts() void HexdumpWidget::fontsUpdated() { setupFonts(); - resizeHexdump(); adjustHexdumpLines(); } @@ -966,7 +956,6 @@ void HexdumpWidget::zoomIn(int range) ui->hexOffsetText->zoomIn(range); ui->hexASCIIText->zoomIn(range); ui->hexHexText->zoomIn(range); - resizeHexdump(); } void HexdumpWidget::zoomOut(int range) @@ -974,5 +963,4 @@ void HexdumpWidget::zoomOut(int range) ui->hexOffsetText->zoomOut(range); ui->hexASCIIText->zoomOut(range); ui->hexHexText->zoomOut(range); - resizeHexdump(); } diff --git a/src/widgets/HexdumpWidget.h b/src/widgets/HexdumpWidget.h index 8c212c12..231e779d 100644 --- a/src/widgets/HexdumpWidget.h +++ b/src/widgets/HexdumpWidget.h @@ -103,7 +103,6 @@ private slots: void on_action32columns_triggered(); void on_action64columns_triggered(); - void resizeHexdump(); void adjustHexdumpLines(); void fontsUpdated(); diff --git a/src/widgets/HexdumpWidget.ui b/src/widgets/HexdumpWidget.ui index c69183b7..7335a86c 100644 --- a/src/widgets/HexdumpWidget.ui +++ b/src/widgets/HexdumpWidget.ui @@ -155,17 +155,11 @@ QToolTip { - + 0 0 - - - Anonymous Pro - 13 - - false @@ -195,7 +189,7 @@ QToolTip { - + 0 0 @@ -212,12 +206,6 @@ QToolTip { 16777215 - - - Anonymous Pro - 13 - - false