Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
893:78ae34f388f6 | 896:78e041e45ff0 |
---|---|
2022 int xdiff = point.x() - origin.x(); | 2022 int xdiff = point.x() - origin.x(); |
2023 int ydiff = point.y() - origin.y(); | 2023 int ydiff = point.y() - origin.y(); |
2024 | 2024 |
2025 int smallThreshold = 10, bigThreshold = 80; | 2025 int smallThreshold = 10, bigThreshold = 80; |
2026 | 2026 |
2027 if (m_manager) { | |
2028 smallThreshold = m_manager->scalePixelSize(smallThreshold); | |
2029 bigThreshold = m_manager->scalePixelSize(bigThreshold); | |
2030 } | |
2031 | |
2027 // SVDEBUG << "Pane::updateDragMode: xdiff = " << xdiff << ", ydiff = " | 2032 // SVDEBUG << "Pane::updateDragMode: xdiff = " << xdiff << ", ydiff = " |
2028 // << ydiff << ", canMoveVertical = " << canMoveVertical << ", drag mode = " << m_dragMode << endl; | 2033 // << ydiff << ", canMoveVertical = " << canMoveVertical << ", drag mode = " << m_dragMode << endl; |
2029 | 2034 |
2030 if (dragMode == UnresolvedDrag) { | 2035 if (dragMode == UnresolvedDrag) { |
2031 | 2036 |