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/downloadlist.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/downloadlist.cpp') diff --git a/src/downloadlist.cpp b/src/downloadlist.cpp index 09f6968c..6d79b0f5 100644 --- a/src/downloadlist.cpp +++ b/src/downloadlist.cpp @@ -98,8 +98,6 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const switch (m_Manager->getState(index.row())) { case DownloadManager::STATE_STARTED: return tr("Started"); - case DownloadManager::STATE_DOWNLOADING: - return m_Manager->getProgress(index.row()).second; case DownloadManager::STATE_CANCELING: return tr("Canceling"); case DownloadManager::STATE_PAUSING: @@ -153,15 +151,10 @@ QVariant DownloadList::data(const QModelIndex &index, int role) const && m_Manager->isInfoIncomplete(index.row())) return QIcon(":/MO/gui/warning_16"); } else if (role == Qt::TextAlignmentRole) { - if (index.column() == COL_SIZE) - return Qt::AlignVCenter | Qt::AlignRight; - else + if (index.column() == COL_NAME) return Qt::AlignVCenter | Qt::AlignLeft; - } else if (role == Qt::SizeHintRole) { - QSize temp = m_FontMetrics.size(Qt::TextSingleLine, data(index, Qt::DisplayRole).toString()); - temp.rwidth() += 20; - temp.rheight() += 12; - return temp; + else + return Qt::AlignVCenter | Qt::AlignRight; } return QVariant(); } -- cgit v1.3.1