forked from qt-creator/qt-creator
Remote Linux: Tweak header view behavior
If there's a surplus of space use a interactive + stretch column. Otherwise make both columns interactive. Task-number: QTCREATORBUG-12949 Change-Id: I2479e53df9d347e02387289396a6c5a2bd07a51a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
@@ -70,7 +70,15 @@ DeploymentDataView::~DeploymentDataView()
|
||||
void DeploymentDataView::updateDeploymentDataModel()
|
||||
{
|
||||
d->deploymentDataModel.setDeploymentData(d->target->deploymentData());
|
||||
QHeaderView *header = d->ui.deploymentDataView->header();
|
||||
header->setSectionResizeMode(0, QHeaderView::Interactive);
|
||||
header->setSectionResizeMode(1, QHeaderView::Interactive);
|
||||
d->ui.deploymentDataView->resizeColumnToContents(0);
|
||||
d->ui.deploymentDataView->resizeColumnToContents(1);
|
||||
if (header->sectionSize(0) + header->sectionSize(1)
|
||||
< d->ui.deploymentDataView->header()->width()) {
|
||||
d->ui.deploymentDataView->header()->setSectionResizeMode(1, QHeaderView::Stretch);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user