mirror of
https://github.com/hasherezade/pe-bear
synced 2026-06-08 14:34:04 +00:00
14 lines
396 B
C++
14 lines
396 B
C++
#include "ViewSettings.h"
|
|
|
|
QPixmap ViewSettings::makeScaledPixMap(const QString &resource, int width, int height)
|
|
{
|
|
QPixmap pix(resource);
|
|
pix = pix.scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
|
return pix;
|
|
}
|
|
|
|
QIcon ViewSettings::makeScaledIcon(const QString &resource, int width, int height)
|
|
{
|
|
return QIcon(ViewSettings::makeScaledPixMap(resource, width, height));
|
|
}
|