comparison view/View.cpp @ 950:43888f891733 osx-retina

Some scaling & zoom bits
author Chris Cannam
date Mon, 20 Apr 2015 14:01:39 +0100
parents a5488775f880
children 53e039d99b5d
comparison
equal deleted inserted replaced
949:e3c7da3d896e 950:43888f891733
450 } 450 }
451 451
452 void 452 void
453 View::setZoomLevel(int z) 453 View::setZoomLevel(int z)
454 { 454 {
455 int dpratio = devicePixelRatio();
456 if (z < dpratio) return;
455 if (z < 1) z = 1; 457 if (z < 1) z = 1;
456 if (m_zoomLevel != int(z)) { 458 if (m_zoomLevel != int(z)) {
457 m_zoomLevel = z; 459 m_zoomLevel = z;
458 emit zoomLevelChanged(z, m_followZoom); 460 emit zoomLevelChanged(z, m_followZoom);
459 update(); 461 update();