diff options
| author | Crystalwarrior <Varsash@Gmail.com> | 2022-03-25 16:00:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-25 16:00:20 +0300 |
| commit | 7af4d285c2a581c6901a2f6d5f888f1feb875c95 (patch) | |
| tree | ce15e39ccc67594b761cb62d1c03f30aea003ea6 | |
| parent | e0c67124a621321ef20fbfd460e79a0fea063740 (diff) | |
Fix aoimage masking being enabled by default (#703)
| -rw-r--r-- | include/aoimage.h | 2 | ||||
| -rw-r--r-- | src/aoimage.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/aoimage.h b/include/aoimage.h index b75eee19..38729d70 100644 --- a/include/aoimage.h +++ b/include/aoimage.h @@ -22,6 +22,8 @@ public: bool is_static = false; + bool masked = false; + bool set_image(QString p_image, QString p_misc = ""); void set_size_and_pos(QString identifier); }; diff --git a/src/aoimage.cpp b/src/aoimage.cpp index 42fd5b81..df69e46f 100644 --- a/src/aoimage.cpp +++ b/src/aoimage.cpp @@ -17,7 +17,9 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q f_pixmap = f_pixmap.scaled(this->size(), Qt::IgnoreAspectRatio); this->setPixmap(f_pixmap); - this->setMask(f_pixmap.mask()); + if (masked) { + this->setMask(f_pixmap.mask()); + } }); } } @@ -49,7 +51,9 @@ bool AOImage::set_image(QString p_image, QString p_misc) f_pixmap = f_pixmap.scaled(this->size(), Qt::IgnoreAspectRatio); this->setPixmap(f_pixmap); - this->setMask(f_pixmap.mask()); + if (masked) { + this->setMask(f_pixmap.mask()); + } } return true; } |
