Replace png icons with svg

This commit is contained in:
Chocobo1 2018-07-23 12:28:14 +08:00
parent 866408151c
commit 71dcc76a64
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
206 changed files with 238 additions and 218 deletions

View file

@ -63,6 +63,13 @@ qreal Utils::Gui::screenScalingFactor(const QWidget *widget)
#endif // Q_OS_WIN
}
QPixmap Utils::Gui::scaledPixmap(const QIcon &icon, const QWidget *widget, const int height)
{
Q_ASSERT(height > 0);
const int scaledHeight = height * Utils::Gui::screenScalingFactor(widget);
return icon.pixmap(scaledHeight);
}
QPixmap Utils::Gui::scaledPixmap(const QString &path, const QWidget *widget, const int height)
{
const QPixmap pixmap(path);