mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Replace png icons with svg
This commit is contained in:
committed by
sledgehammer999
parent
45d4d22055
commit
5cd5cc71a8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user