From 03823a433a27bb5f9a94973c47e1408dd83cc5c0 Mon Sep 17 00:00:00 2001 From: Krzysztof Starecki Date: Mon, 31 Dec 2018 02:15:47 +0100 Subject: Add qss styling options for progress bar and compact mode widgets --- src/mainwindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4f60ae16..328c0b2d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -4655,6 +4655,8 @@ void MainWindow::on_actionSettings_triggered() NexusInterface::instance(&m_PluginContainer)->setNMMVersion(settings.getNMMVersion()); + updateDownloadView(); + m_OrganizerCore.updateVFSParams(settings.logLevel(), settings.crashDumpsType(), settings.executablesBlacklist()); m_OrganizerCore.cycleDiagnostics(); } @@ -4709,6 +4711,7 @@ void MainWindow::languageChange(const QString &newLanguage) createHelpWidget(); + updateDownloadView(); updateProblemsButton(); ui->listOptionsBtn->setMenu(modListContextMenu()); @@ -5160,6 +5163,7 @@ void MainWindow::initDownloadView() ui->downloadView->header()->setSectionResizeMode(QHeaderView::Interactive); ui->downloadView->header()->setSectionResizeMode(0, QHeaderView::Stretch); ui->downloadView->sortByColumn(1, Qt::DescendingOrder); + updateDownloadView(); connect(ui->downloadView, SIGNAL(installDownload(int)), &m_OrganizerCore, SLOT(installDownload(int))); connect(ui->downloadView, SIGNAL(queryInfo(int)), m_OrganizerCore.downloadManager(), SLOT(queryInfo(int))); @@ -5173,6 +5177,15 @@ void MainWindow::initDownloadView() connect(ui->downloadView, SIGNAL(resumeDownload(int)), this, SLOT(resumeDownload(int))); } +void MainWindow::updateDownloadView() +{ + if (m_OrganizerCore.settings().compactDownloads()) + ui->downloadView->setProperty("compact", true); + else + ui->downloadView->setProperty("compact", false); + ui->downloadView->style()->unpolish(ui->downloadView); + ui->downloadView->style()->polish(ui->downloadView); +} void MainWindow::modDetailsUpdated(bool) { -- cgit v1.3.1