Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/aoimage.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class AOImage : public QLabel {

bool is_static = false;

bool masked = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: member variable 'masked' has public visibility [misc-non-private-member-variables-in-classes]

  bool masked = false;
       ^


bool set_image(QString p_image, QString p_misc = "");
void set_size_and_pos(QString identifier);
};
Expand Down
8 changes: 6 additions & 2 deletions src/aoimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
});
}
}
Expand Down Expand Up @@ -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;
}