r23593 by craig - Add in test SmartZoomNativeGesture between 75 and 100% zoom

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 11 16:32:41 UTC 2020


Author: craig
Date: Sat Apr 11 16:32:41 2020
New Revision: 23593

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23593
Log:
Add in test SmartZoomNativeGesture between 75 and 100% zoom

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23593&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Sat Apr 11 16:32:41 2020
@@ -241,6 +241,21 @@
 		FPoint mp = m_canvas->globalToCanvas(e->globalPos());
 		zoom(mp.x(), mp.y(), m_canvas->scale() * delta, true);
 	}
+	if (e->gestureType() == Qt::SmartZoomNativeGesture)
+	{
+		static bool zoomTo100 = false;
+		FPoint mp = m_canvas->globalToCanvas(e->globalPos());
+		if (zoomTo100)
+		{
+			zoom(mp.x(), mp.y(), Prefs->displayPrefs.displayScale, true);
+		}
+		else
+		{
+			zoom(mp.x(), mp.y(), Prefs->displayPrefs.displayScale*0.75, true);
+		}
+		zoomTo100 = !zoomTo100;
+	}
+	e->accept();
 }
 
 void ScribusView::iconSetChange()




More information about the scribus-commit mailing list