Allow resizing of variables/constants columns

This commit is contained in:
baldurk
2018-02-24 23:22:22 +00:00
parent 525facfcd0
commit f3fdf79d8a
+12 -4
View File
@@ -425,15 +425,18 @@ void ShaderViewer::debugShader(const ShaderBindpointMapping *bind, const ShaderR
ui->outputSig->hide();
ui->variables->setColumns({tr("Name"), tr("Type"), tr("Value")});
ui->variables->header()->setSectionResizeMode(0, QHeaderView::Stretch);
ui->variables->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
ui->variables->header()->setSectionResizeMode(0, QHeaderView::Interactive);
ui->variables->header()->setSectionResizeMode(1, QHeaderView::Interactive);
ui->variables->header()->setSectionResizeMode(2, QHeaderView::Stretch);
ui->constants->setColumns({tr("Name"), tr("Type"), tr("Value")});
ui->constants->header()->setSectionResizeMode(0, QHeaderView::Stretch);
ui->constants->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
ui->constants->header()->setSectionResizeMode(0, QHeaderView::Interactive);
ui->constants->header()->setSectionResizeMode(1, QHeaderView::Interactive);
ui->constants->header()->setSectionResizeMode(2, QHeaderView::Stretch);
ui->variables->setTooltipElidedItems(false);
ui->constants->setTooltipElidedItems(false);
ui->watch->setWindowTitle(tr("Watch"));
ui->docking->addToolWindow(
ui->watch, ToolWindowManager::AreaReference(ToolWindowManager::BottomOf,
@@ -1528,6 +1531,11 @@ void ShaderViewer::updateDebugging()
ui->watch->setUpdatesEnabled(true);
ui->constants->resizeColumnToContents(0);
ui->variables->resizeColumnToContents(0);
ui->constants->resizeColumnToContents(1);
ui->variables->resizeColumnToContents(1);
updateVariableTooltip();
}