Replace png icons with svg

This commit is contained in:
Chocobo1
2018-07-23 12:28:14 +08:00
parent 866408151c
commit 71dcc76a64
206 changed files with 238 additions and 218 deletions

View File

@@ -29,6 +29,8 @@
#include "iconprovider.h"
#include <QFileInfo>
IconProvider::IconProvider(QObject *parent)
: QObject(parent)
{
@@ -57,7 +59,13 @@ IconProvider *IconProvider::instance()
QString IconProvider::getIconPath(const QString &iconId) const
{
return ":/icons/qbt-theme/" + iconId + ".png";
// there are a few icons not available in svg
const QString pathSvg = ":/icons/qbt-theme/" + iconId + ".svg";
if (QFileInfo::exists(pathSvg))
return pathSvg;
const QString pathPng = ":/icons/qbt-theme/" + iconId + ".png";
return pathPng;
}
IconProvider *IconProvider::m_instance = nullptr;