Add proper masking to AOImage elements

This commit is contained in:
in1tiate 2020-10-13 15:42:06 -05:00
parent 849f91d991
commit 38d5fc7586

View File

@ -29,9 +29,9 @@ bool AOImage::set_image(QString p_image)
} }
QPixmap f_pixmap(final_image_path); QPixmap f_pixmap(final_image_path);
f_pixmap = f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio);
this->setPixmap( this->setPixmap(f_pixmap);
f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio)); this->setMask(f_pixmap.mask());
return true; return true;
} }
@ -45,7 +45,8 @@ bool AOImage::set_chatbox(QString p_path)
QPixmap f_pixmap(p_path); QPixmap f_pixmap(p_path);
this->setPixmap( f_pixmap = f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio);
f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio)); this->setPixmap(f_pixmap);
this->setMask(f_pixmap.mask());
return true; return true;
} }