From 7af4d285c2a581c6901a2f6d5f888f1feb875c95 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Fri, 25 Mar 2022 16:00:20 +0300 Subject: [PATCH] Fix aoimage masking being enabled by default (#703) --- include/aoimage.h | 2 ++ src/aoimage.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/aoimage.h b/include/aoimage.h index b75eee1..38729d7 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 42fd5b8..df69e46 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; }