added various sizes in icons cache so that we do not always allocate the largest sizes

This commit is contained in:
csoler 2019-06-04 11:49:26 +02:00
parent e66fb923fb
commit 94cbe65142
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
18 changed files with 107 additions and 64 deletions

View file

@ -45,8 +45,8 @@ AvatarDialog::AvatarDialog(QWidget *parent) :
updateInterface();
}
const int AvatarDialog::RS_AVATAR_IMAGE_W = 128;
const int AvatarDialog::RS_AVATAR_IMAGE_H = 128;
const int AvatarDialog::RS_AVATAR_DEFAULT_IMAGE_W = 64;
const int AvatarDialog::RS_AVATAR_DEFAULT_IMAGE_H = 64;
AvatarDialog::~AvatarDialog()
{
@ -55,7 +55,7 @@ AvatarDialog::~AvatarDialog()
void AvatarDialog::changeAvatar()
{
QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load Avatar"), RS_AVATAR_IMAGE_W,RS_AVATAR_IMAGE_H);
QPixmap img = misc::getOpenThumbnailedPicture(this, tr("Load Avatar"), RS_AVATAR_DEFAULT_IMAGE_W,RS_AVATAR_DEFAULT_IMAGE_H);
if (img.isNull())
return;