mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	QML UI: Fix incorrect sizing of dive profile
This resizes the dive profile to always maintain an equal width and height, so that the sizing is the same in all devices. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									a27623dad0
								
							
						
					
					
						commit
						d337def212
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -27,7 +27,7 @@ void QMLProfile::paint(QPainter *painter)
 | 
			
		|||
	prefs.animation_speed = 0; // no animations while rendering the QGraphicsView
 | 
			
		||||
	profile->plotDive(d);
 | 
			
		||||
	QTransform profileTransform;
 | 
			
		||||
	profileTransform.scale((this->width() / profile->sceneRect().width()) - 1, (this->height()/profile->sceneRect().height()) - 1);
 | 
			
		||||
	profileTransform.scale(this->height() / 100, this->height() / 100);
 | 
			
		||||
	profile->setTransform(profileTransform);
 | 
			
		||||
	profile->render(painter);
 | 
			
		||||
	prefs.animation_speed = old_animation_speed;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue