diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2020-10-13 15:42:06 -0500 |
|---|---|---|
| committer | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2020-10-13 15:42:06 -0500 |
| commit | 38d5fc758622223e28ce3d2fa36057e8a1b6dec5 (patch) | |
| tree | efcd0fa29852f61a0ca78fdd0d10fce0dfd50692 | |
| parent | 849f91d991bf0e95d579df268e9ab358e09b1ac1 (diff) | |
Add proper masking to AOImage elements
| -rw-r--r-- | src/aoimage.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/aoimage.cpp b/src/aoimage.cpp index 2663ba05..380b5aac 100644 --- a/src/aoimage.cpp +++ b/src/aoimage.cpp @@ -29,9 +29,9 @@ bool AOImage::set_image(QString p_image) } QPixmap f_pixmap(final_image_path); - - this->setPixmap( - f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio)); + f_pixmap = f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio); + this->setPixmap(f_pixmap); + this->setMask(f_pixmap.mask()); return true; } @@ -45,7 +45,8 @@ bool AOImage::set_chatbox(QString p_path) QPixmap f_pixmap(p_path); - this->setPixmap( - f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio)); + f_pixmap = f_pixmap.scaled(this->width(), this->height(), Qt::IgnoreAspectRatio); + this->setPixmap(f_pixmap); + this->setMask(f_pixmap.mask()); return true; } |
