mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Change the Star Widget to use QImage instead of QPixmap
Also, clean a few calls, this should make the widget a tiny bit faster. This patch also moves the grayImage function from the star widget to the global scope, so I can use it on the Calendar widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									f3f03e2ee8
								
							
						
					
					
						commit
						be462ae1a6
					
				
					 5 changed files with 30 additions and 25 deletions
				
			
		| 
						 | 
				
			
			@ -332,7 +332,8 @@ void DateWidget::paintEvent(QPaintEvent *event)
 | 
			
		|||
	static int pixRedTag = 18; 	/* calculated using a ruler. */
 | 
			
		||||
 | 
			
		||||
	QPainter painter(this);
 | 
			
		||||
	painter.drawPixmap(QPoint(0,0), pix);
 | 
			
		||||
 | 
			
		||||
	painter.drawPixmap(QPoint(0,0), isEnabled() ? pix : QPixmap::fromImage(grayImage(pix.toImage())));
 | 
			
		||||
 | 
			
		||||
	QString month = mDate.toString("MMM");
 | 
			
		||||
	QString year = mDate.toString("yyyy");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue