mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Replace png icons with svg
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user