mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Resize annotation key column to fit contents
* All other space is used by the value
This commit is contained in:
@@ -42,7 +42,8 @@ AnnotationDisplay::AnnotationDisplay(ICaptureContext &ctx, bool standalone, QWid
|
||||
m_Tree->setHeader(m_Header);
|
||||
|
||||
m_Tree->setColumns({lit("Key"), tr("Value")});
|
||||
m_Header->setColumnStretchHints({1, 4});
|
||||
m_Header->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||
m_Header->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||
m_Tree->setFont(Formatter::PreferredFont());
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
@@ -259,12 +260,16 @@ void AnnotationDisplay::setAnnotationObject(const SDObject *annotation)
|
||||
if(m_HasGoColumn)
|
||||
{
|
||||
m_Tree->setColumns({lit("Key"), tr("Value"), tr("Go")});
|
||||
m_Header->setColumnStretchHints({1, 4, -1});
|
||||
m_Header->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||
m_Header->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||
m_Header->setSectionResizeMode(2, QHeaderView::Fixed);
|
||||
m_Header->resizeSection(2, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Tree->setColumns({lit("Key"), tr("Value")});
|
||||
m_Header->setColumnStretchHints({1, 4});
|
||||
m_Header->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||
m_Header->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||
}
|
||||
|
||||
if(m_Annotation)
|
||||
|
||||
Reference in New Issue
Block a user