mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Improve icon utils by supporting explicit file name destination
Useful for using svg templates that can generate multiple icons, e.g. labels
This commit is contained in:
@ -3,24 +3,29 @@
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
struct RecolorOptions {
|
||||
QString suffix;
|
||||
QString fileName;
|
||||
};
|
||||
|
||||
QString readSvg(const QString &resourcePath);
|
||||
QString writeSvg(const QString &svg, const QString &resourcePath, const QString &themeName);
|
||||
QString writeSvg(const QString &svg, const QString &resourcePath, const QString &themeName, const RecolorOptions &options = {});
|
||||
|
||||
QString recolorSvgXML(QString &svg, const QString &placeHolder, const QColor &color);
|
||||
QString recoloredSvgToThemeFile(const QString &resourcePath,
|
||||
const QColor &color, // #f0f (magenta)
|
||||
const QString &themeName,
|
||||
const QString &suffix = QString());
|
||||
const RecolorOptions &options = {});
|
||||
QString recoloredSvgToThemeFile(const QString &resourcePath,
|
||||
const QColor &color1, // #f0f (magenta)
|
||||
const QColor &color2, // #0ff (cyan)
|
||||
const QString &themeName,
|
||||
const QString &suffix = QString());
|
||||
const RecolorOptions &options = {});
|
||||
QString recoloredSvgToThemeFile(const QString &resourcePath,
|
||||
const QColor &color1, // #f0f (magenta)
|
||||
const QColor &color2, // #0ff (cyan)
|
||||
const QColor &color3, // #ff0 (yellow)
|
||||
const QString &themeName,
|
||||
const QString &suffix = QString());
|
||||
const RecolorOptions &options = {});
|
||||
|
||||
#endif // ICON_UTILS_H
|
||||
|
||||
Reference in New Issue
Block a user