| 53 | } |
| 54 | |
| 55 | void DownloadsTab::update() |
| 56 | { |
| 57 | // this means downloadTab initialization hasn't happened yet |
| 58 | if (ui.list->model() == nullptr) { |
| 59 | return; |
| 60 | } |
| 61 | |
| 62 | // set the view attribute and default row sizes |
| 63 | if (m_core.settings().interface().compactDownloads()) { |
| 64 | ui.list->setProperty("downloadView", "compact"); |
| 65 | ui.list->setStyleSheet("DownloadListView::item { padding: 4px 2px; }"); |
| 66 | } else { |
| 67 | ui.list->setProperty("downloadView", "standard"); |
| 68 | ui.list->setStyleSheet("DownloadListView::item { padding: 16px 4px; }"); |
| 69 | } |
| 70 | |
| 71 | ui.list->style()->unpolish(ui.list); |
| 72 | ui.list->style()->polish(ui.list); |
| 73 | qobject_cast<DownloadListHeader*>(ui.list->header())->customResizeSections(); |
| 74 | |
| 75 | m_core.downloadManager()->refreshList(); |
| 76 | } |
| 77 | |
| 78 | void DownloadsTab::refresh() |
| 79 | { |
nothing calls this directly
no test coverage detected