Provide scaled pixmaps by UIThemeManager

Avoid leaking the paths of the theme resource files outside of the theme support implementation.

PR #18269.
This commit is contained in:
Vladimir Golovnev
2023-01-17 09:29:00 +03:00
committed by GitHub
parent 43e059801e
commit 53cec6db09
7 changed files with 33 additions and 55 deletions

View File

@@ -34,6 +34,7 @@
#include <QHash>
#include <QIcon>
#include <QObject>
#include <QPixmap>
#include <QString>
#include "base/pathfwd.h"
@@ -58,9 +59,9 @@ public:
static void freeInstance();
static UIThemeManager *instance();
Path getIconPath(const QString &iconId) const;
QIcon getIcon(const QString &iconId, const QString &fallback = {}) const;
QIcon getFlagIcon(const QString &countryIsoCode) const;
QPixmap getScaledPixmap(const QString &iconId, int height) const;
QColor getColor(const QString &id, const QColor &defaultColor) const;