diff --git a/external/rizin b/external/rizin new file mode 160000 index 000000000..fb008a68f --- /dev/null +++ b/external/rizin @@ -0,0 +1 @@ +Subproject commit fb008a68f413f3266db465193df01159b3dbbb79 diff --git a/src/dialogs/XrefsDialog.cpp b/src/dialogs/XrefsDialog.cpp index e93797d0a..0fbe676e8 100644 --- a/src/dialogs/XrefsDialog.cpp +++ b/src/dialogs/XrefsDialog.cpp @@ -184,6 +184,18 @@ void XrefsDialog::fillRefsForAddress(RVA addr, QString name, bool whole_function // Adjust columns to content qhelpers::adjustColumns(ui->fromTreeWidget, fromModel.columnCount(), 0); qhelpers::adjustColumns(ui->toTreeWidget, toModel.columnCount(), 0); + // Prevent columns from exceeding a maximum width (e.g., 400px) + for (int i = 0; i < ui->fromTreeWidget->header()->count(); ++i) { + int width = ui->fromTreeWidget->columnWidth(i); + if (width > 400) + ui->fromTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + for (int i = 0; i < ui->toTreeWidget->header()->count(); ++i) { + int width = ui->toTreeWidget->columnWidth(i); + if (width > 400) + ui->toTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + // Automatically select the first line if (!qhelpers::selectFirstItem(ui->toTreeWidget)) { @@ -205,6 +217,18 @@ void XrefsDialog::fillRefsForVariable(QString nameOfVariable, RVA offset) // Adjust columns to content qhelpers::adjustColumns(ui->fromTreeWidget, fromModel.columnCount(), 0); qhelpers::adjustColumns(ui->toTreeWidget, toModel.columnCount(), 0); + // Prevent columns from exceeding a maximum width (e.g., 400px) + for (int i = 0; i < ui->fromTreeWidget->header()->count(); ++i) { + int width = ui->fromTreeWidget->columnWidth(i); + if (width > 400) + ui->fromTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + for (int i = 0; i < ui->toTreeWidget->header()->count(); ++i) { + int width = ui->toTreeWidget->columnWidth(i); + if (width > 400) + ui->toTreeWidget->setColumnWidth(i, std::min(width, 400)); + } + // Automatically select the first line if (!qhelpers::selectFirstItem(ui->toTreeWidget)) {