| 88 | } |
| 89 | |
| 90 | void ResourceBrowserWidget::setupLayout() |
| 91 | { |
| 92 | // now the view was setup properly and we can mess with the splitter to resize |
| 93 | // the widgets for nicer display |
| 94 | |
| 95 | int viewWidth = ui->treeView->columnWidth(0) |
| 96 | + ui->treeView->columnWidth(1) |
| 97 | + ui->treeView->columnWidth(2) |
| 98 | + ui->treeView->contentsMargins().left() |
| 99 | + ui->treeView->contentsMargins().right() |
| 100 | + ui->treeView->verticalScrollBar()->width(); |
| 101 | const int totalWidth = ui->mainSplitter->width(); |
| 102 | const int minPreviewWidth = 150; |
| 103 | if (totalWidth > viewWidth + minPreviewWidth) { |
| 104 | m_stateManager.setDefaultSizes(ui->mainSplitter, |
| 105 | UISizeVector() << viewWidth |
| 106 | << (totalWidth - viewWidth |
| 107 | - ui->mainSplitter->handleWidth())); |
| 108 | m_stateManager.restoreState(); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | void ResourceBrowserWidget::resourceDeselected() |
| 113 | { |
nothing calls this directly
no test coverage detected