mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Right align both durations in event browser and perf counter data
This commit is contained in:
@@ -84,6 +84,8 @@ EventBrowser::EventBrowser(ICaptureContext &ctx, QWidget *parent)
|
||||
ui->events->header()->setSectionResizeMode(COL_DRAW, QHeaderView::Interactive);
|
||||
ui->events->header()->setSectionResizeMode(COL_DURATION, QHeaderView::Interactive);
|
||||
|
||||
ui->events->setColumnAlignment(COL_DURATION, Qt::AlignRight | Qt::AlignCenter);
|
||||
|
||||
ui->events->header()->setMinimumSectionSize(40);
|
||||
|
||||
ui->events->header()->setSectionsMovable(true);
|
||||
|
||||
@@ -85,6 +85,13 @@ struct CustomSortedTableItem : public QTableWidgetItem
|
||||
return sortVal.val.d < customother.sortVal.val.d;
|
||||
}
|
||||
|
||||
virtual QVariant data(int role) const
|
||||
{
|
||||
if(role == Qt::TextAlignmentRole && column() > 0)
|
||||
return QVariant(Qt::AlignRight | Qt::AlignCenter);
|
||||
|
||||
return QTableWidgetItem::data(role);
|
||||
}
|
||||
SortValue sortVal;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user