diff view/Pane.cpp @ 896:78e041e45ff0

Scale drag thresholds according to actual display resolution
author Chris Cannam
date Thu, 15 Jan 2015 10:42:00 +0000
parents 241688360929
children 1fc4f29feb2e 4968bbaf1ed8
line wrap: on
line diff
--- a/view/Pane.cpp	Mon Dec 15 16:08:26 2014 +0000
+++ b/view/Pane.cpp	Thu Jan 15 10:42:00 2015 +0000
@@ -2024,6 +2024,11 @@
 
     int smallThreshold = 10, bigThreshold = 80;
 
+    if (m_manager) {
+        smallThreshold = m_manager->scalePixelSize(smallThreshold);
+        bigThreshold = m_manager->scalePixelSize(bigThreshold);
+    }
+
 //    SVDEBUG << "Pane::updateDragMode: xdiff = " << xdiff << ", ydiff = "
 //              << ydiff << ", canMoveVertical = " << canMoveVertical << ", drag mode = " << m_dragMode << endl;