MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / update

Method update

src/downloadstab.cpp:55–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void 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
78void DownloadsTab::refresh()
79{

Callers

nothing calls this directly

Calls 6

modelMethod · 0.80
compactDownloadsMethod · 0.80
customResizeSectionsMethod · 0.80
refreshListMethod · 0.80
settingsMethod · 0.45
downloadManagerMethod · 0.45

Tested by

no test coverage detected