mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix the colors - brush wasn't being set anymore.
Also a bit of code cleanup. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									a6e95511a6
								
							
						
					
					
						commit
						d2c5770ae1
					
				
					 2 changed files with 1 additions and 6 deletions
				
			
		|  | @ -14,13 +14,11 @@ DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent), | |||
| 	internalAlignFlags(Qt::AlignHCenter | Qt::AlignVCenter), | ||||
| 	textBackgroundItem(new QGraphicsPathItem(this)), | ||||
| 	textItem(new QGraphicsPathItem(this)), | ||||
| 	colorIndex(SAC_DEFAULT), | ||||
| 	scale(1.0) | ||||
| { | ||||
| 	setFlag(ItemIgnoresTransformations); | ||||
| 	textBackgroundItem->setBrush(QBrush(getColor(TEXT_BACKGROUND))); | ||||
| 	textBackgroundItem->setPen(Qt::NoPen); | ||||
| 	textItem->setBrush(brush); | ||||
| 	textItem->setPen(Qt::NoPen); | ||||
| } | ||||
| 
 | ||||
|  | @ -32,8 +30,7 @@ void DiveTextItem::setAlignment(int alignFlags) | |||
| 
 | ||||
| void DiveTextItem::setBrush(const QBrush &b) | ||||
| { | ||||
| 	brush = b; | ||||
| 	updateText(); | ||||
| 	textItem->setBrush(b); | ||||
| } | ||||
| 
 | ||||
| void DiveTextItem::setScale(double newscale) | ||||
|  |  | |||
|  | @ -25,8 +25,6 @@ private: | |||
| 	QGraphicsPathItem *textBackgroundItem; | ||||
| 	QGraphicsPathItem *textItem; | ||||
| 	QString internalText; | ||||
| 	color_indice_t colorIndex; | ||||
| 	QBrush brush; | ||||
| 	double scale; | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue