From 4a8352169be1afbc7c18983f6d9d2b591f2488b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Mon, 5 Mar 2018 15:10:17 +0100 Subject: [PATCH] Make HexdumpWidget more resizable --- src/widgets/HexdumpWidget.cpp | 4 +- src/widgets/HexdumpWidget.ui | 1194 ++++++++++++++++----------------- 2 files changed, 595 insertions(+), 603 deletions(-) diff --git a/src/widgets/HexdumpWidget.cpp b/src/widgets/HexdumpWidget.cpp index 9b0193f5..98b5cf78 100644 --- a/src/widgets/HexdumpWidget.cpp +++ b/src/widgets/HexdumpWidget.cpp @@ -37,6 +37,8 @@ HexdumpWidget::HexdumpWidget(QWidget *parent, Qt::WindowFlags flags) : margin = static_cast(ui->hexASCIIText->document()->documentMargin()); ui->asciiHeaderLabel->setContentsMargins(margin, 0, margin, 0); + ui->splitter->setCollapsible(0, false); // Only Sidebar should collapse + setupFonts(); colorsUpdatedSlot(); @@ -1122,5 +1124,5 @@ void HexdumpWidget::updateWidths() ui->hexOffsetText->setFixedWidth(ui->hexOffsetText->document()->size().width()); ui->hexASCIIText->document()->adjustSize(); - ui->hexASCIIText->setFixedWidth(ui->hexASCIIText->document()->size().width()); + ui->hexASCIIText->setMinimumWidth(ui->hexASCIIText->document()->size().width()); } diff --git a/src/widgets/HexdumpWidget.ui b/src/widgets/HexdumpWidget.ui index e1ea3eaa..d8cc037d 100644 --- a/src/widgets/HexdumpWidget.ui +++ b/src/widgets/HexdumpWidget.ui @@ -7,11 +7,11 @@ 0 0 959 - 831 + 807 - + 0 0 @@ -21,413 +21,315 @@ - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - false - - - QFrame::NoFrame - - - 0 - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - QTextEdit::NoWrap - - - 3 - - - Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - Qt::Vertical - - - - - - - - 0 - 0 - - - - 0 1 2 3 ... - - - - - - - - 0 - 0 - - - - false - - - - - - QFrame::NoFrame - - - 0 - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - - - - - 0123... - - - - - - - Qt::Vertical - - - - - - - Offset - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 16777215 - - - - - Anonymous Pro - 13 - - - - false - - - QFrame::NoFrame - - - 0 - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - QTextEdit::NoWrap - - - 3 - - - - - - - - - - 0 - 0 - + + + Qt::Horizontal - - QTabWidget::North - - - 0 - - - true - - - false - - - - Parsing - - - - 0 + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 553 + 764 + - - 0 - - - 0 - - - 0 - - - - - 5 - - - 0 - - - - - 0 - - - - - - 0 - 0 - - - - Disassembly - - - - Disassembly - - - - - String - - - - - Assembler - - - - - C bytes - - - - - C half-words (2 byte) - - - - - C words (4 byte) - - - - - C dwords (8 byte) - - - - - Python - - - - - JSON - - - - - JavaScript - - - - - - - - - 0 - 0 - - - - Endian - - - - - - - QComboBox::AdjustToMinimumContentsLength - - - - Little - - - - - Big - - - - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - - - QLayout::SetMinimumSize - - - 5 - + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + false + + + QFrame::NoFrame + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustToContents + + + QTextEdit::NoWrap + + + 3 + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + 0 1 2 3 ... + + + + + + + + 0 + 0 + + + + false + + + + + + QFrame::NoFrame + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustToContents + + + + + + + + 0 + 0 + + + + 0123... + + + + + + + Offset + + + + + + + + 0 + 0 + + + + + Anonymous Pro + 13 + + + + false + + + QFrame::NoFrame + + + 0 + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustToContents + + + QTextEdit::NoWrap + + + 3 + + + + + + + Qt::Vertical + + + + + + + + + + 0 + 0 + + + + QTabWidget::North + + + 1 + + + true + + + false + + + + Parsing + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 5 + + + 0 + + + 0 - - 5 - - - 5 - - - - - 0 - 0 - - - - Arch - - - - - + 0 0 - - QComboBox::AdjustToMinimumContentsLength - - - false + + Disassembly + + + Disassembly + + + + + String + + + + + Assembler + + + + + C bytes + + + + + C half-words (2 byte) + + + + + C words (4 byte) + + + + + C dwords (8 byte) + + + + + Python + + + + + JSON + + + + + JavaScript + + - + 0 @@ -435,161 +337,248 @@ - Bits + Endian - + QComboBox::AdjustToMinimumContentsLength - 16 + Little - 32 - - - - - 64 + Big - - - - - - - 0 - 0 - - - - - Anonymous Pro - 13 - - - - QFrame::NoFrame - - - 0 - - - - - - - - - - - - - Information - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 75 - true - - - - Bytes info - - - - - - - QFormLayout::ExpandingFieldsGrow - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - Qt::AlignHCenter|Qt::AlignTop - - - 5 - - - 6 - - - 5 - - - 5 - - - - - - 0 - 0 - - - - MD5: - - - - - - - 5 - - - - - - 0 - 0 - + + + + + + 0 + 0 + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + QLayout::SetMinimumSize - - false + + 5 - - true + + 0 - - - - - - Copy MD5 + + 5 - - QToolButton { /* all types of tool button */ + + 5 + + + + + + 0 + 0 + + + + Arch + + + + + + + + 0 + 0 + + + + QComboBox::AdjustToMinimumContentsLength + + + false + + + + + + + + 0 + 0 + + + + Bits + + + + + + + QComboBox::AdjustToMinimumContentsLength + + + + 16 + + + + + 32 + + + + + 64 + + + + + + + + + + + + 0 + 0 + + + + + Anonymous Pro + 13 + + + + QFrame::NoFrame + + + 0 + + + + + + + + + + + + + Information + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFormLayout::ExpandingFieldsGrow + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + Qt::AlignHCenter|Qt::AlignTop + + + 5 + + + 6 + + + 5 + + + 5 + + + + + + 0 + 0 + + + + MD5: + + + + + + + 5 + + + + + + 0 + 0 + + + + false + + + true + + + + + + + Copy MD5 + + + QToolButton { /* all types of tool button */ padding: 1px; padding-left: 5px; padding-right: 5px; @@ -606,49 +595,49 @@ QToolTip { border: 3px solid #444; color: rgb(232, 232, 232); } - - - - - - - - - - - - SHA1: - - - - - - - 5 - - - - - - 0 - 0 - - - - false - - - true - - - - - - - Copy SHA1 - - - QToolButton { /* all types of tool button */ + + + + + + + + + + + + SHA1: + + + + + + + 5 + + + + + + 0 + 0 + + + + false + + + true + + + + + + + Copy SHA1 + + + QToolButton { /* all types of tool button */ padding: 1px; padding-left: 5px; padding-right: 5px; @@ -665,40 +654,41 @@ QToolTip { border: 3px solid #444; color: rgb(232, 232, 232); } - - - - - - - - - - - - Entropy: - - - - - - - - 0 - 0 - - - - false - - - true - - - - - - + + + + + + + + + + + + Entropy: + + + + + + + + 0 + 0 + + + + false + + + true + + + + + + +