mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	core: remove DPR from IconMetrics class
There is no user of this left, because the device-pixel-ratio is now passed directly to the profile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									5f22de7ebe
								
							
						
					
					
						commit
						9e831c5001
					
				
					 3 changed files with 1 additions and 11 deletions
				
			
		|  | @ -16,8 +16,7 @@ IconMetrics::IconMetrics() : | ||||||
| 	sz_med(-1), | 	sz_med(-1), | ||||||
| 	sz_big(-1), | 	sz_big(-1), | ||||||
| 	sz_pic(-1), | 	sz_pic(-1), | ||||||
| 	spacing(-1), | 	spacing(-1) | ||||||
| 	dpr(1.0) |  | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -58,8 +57,3 @@ const IconMetrics &defaultIconMetrics() | ||||||
| 
 | 
 | ||||||
| 	return dfltIconMetrics; | 	return dfltIconMetrics; | ||||||
| } | } | ||||||
| 
 |  | ||||||
| void updateDevicePixelRatio(double dpr) |  | ||||||
| { |  | ||||||
| 	dfltIconMetrics.dpr = dpr; |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  | @ -11,7 +11,6 @@ | ||||||
| 
 | 
 | ||||||
| #include <QFont> | #include <QFont> | ||||||
| #include <QFontMetrics> | #include <QFontMetrics> | ||||||
| #include <QSize> |  | ||||||
| 
 | 
 | ||||||
| QFont defaultModelFont(); | QFont defaultModelFont(); | ||||||
| QFontMetrics defaultModelFontMetrics(); | QFontMetrics defaultModelFontMetrics(); | ||||||
|  | @ -27,11 +26,9 @@ struct IconMetrics { | ||||||
| 	// icon spacing
 | 	// icon spacing
 | ||||||
| 	int spacing; // ex 2px
 | 	int spacing; // ex 2px
 | ||||||
| 	// devicePixelRatio
 | 	// devicePixelRatio
 | ||||||
| 	double dpr; // 1.0 for traditional screens, HiDPI screens up to 3.0
 |  | ||||||
| 	IconMetrics(); | 	IconMetrics(); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| const IconMetrics &defaultIconMetrics(); | const IconMetrics &defaultIconMetrics(); | ||||||
| void updateDevicePixelRatio(double dpr); |  | ||||||
| 
 | 
 | ||||||
| #endif // METRICS_H
 | #endif // METRICS_H
 | ||||||
|  |  | ||||||
|  | @ -88,7 +88,6 @@ void QMLProfile::setDevicePixelRatio(qreal dpr) | ||||||
| 		m_devicePixelRatio = dpr; | 		m_devicePixelRatio = dpr; | ||||||
| 		// Recreate the view to redraw the text items with the new scale.
 | 		// Recreate the view to redraw the text items with the new scale.
 | ||||||
| 		createProfileView(); | 		createProfileView(); | ||||||
| 		updateDevicePixelRatio(dpr); |  | ||||||
| 		emit devicePixelRatioChanged(); | 		emit devicePixelRatioChanged(); | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue