Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions external/rizin
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Submodule rizin added at fb008a
24 changes: 24 additions & 0 deletions src/dialogs/XrefsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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)) {
Expand Down