Fix aoimage masking being enabled by default (#703)
This commit is contained in:
		
							parent
							
								
									e0c67124a6
								
							
						
					
					
						commit
						7af4d285c2
					
				@ -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);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
      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);
 | 
			
		||||
    if (masked) {
 | 
			
		||||
      this->setMask(f_pixmap.mask());
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user